If you look at the help for predict.naiveBayes, you can see that newdata is
supposed to be a data.frame.  However, you are providing newdata as a
vector, titanic_small[,-1].  Try using titanic_small[,-1, drop=FALSE]
instead.

Jean

On Tue, Mar 12, 2013 at 11:35 PM, S. Zhou <myxjtu@yahoo.com> wrote:

> titanic_small[,-1]

	[[alternative HTML version deleted]]

