This error occurs when one of your categorical variables in data has only NA values, and it seems to deal well with numercial NA in most cases. As a solution you can set all such variables to a single constant - this wont affect prediction result
-- View this message in context: http://r.789695.n4.nabble.com/naiveBayes-error-attempt-to-set-an-attribute-on-NULL-tp4631560p4639096.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.