[R] R Error

From: john.hogan <john.hogan4_at_yahoo.co.uk>
Date: Thu, 17 Apr 2008 04:15:14 -0700 (PDT)

Hi,

I am having a small problem with my code that is preventing my source file from running. Can anyone identify my error and how to maybe resolve the issue?

command when error occurs:
modelprobability_genderNB <- naiveBayes(gender ~ ., data = probability_genderNB)

My error:
Error in tapply(var, y, mean, na.rm = TRUE) :   arguments must have same length

My dataset:
gender relationship

Male	   1
Male	   1
Female	  1
Female	  2
Male	   1
Male	   1
Female	  2
Female	  1
Male	   2
Male	   1
Female	  1
Male	   2
Female	  1
Male	   1
Female	  1
Male	   1
Male	   2
Female	  2
Male	   2
Male	   1
Male	   1
Female	  1
Female	  2

Hope to hear from someone soon.

Regards,

John.

-- 
View this message in context: http://www.nabble.com/R-Error-tp16743328p16743328.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Thu 17 Apr 2008 - 11:31:31 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 17 Apr 2008 - 12:30:30 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive