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@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.

Reply via email to