Hi all,
Does any of you know how to make a decision tree when the data set contains
factors and numericals?
I've got a data frame with 3 columns, where y and x1 are numerical and x2
contains factors. Is it possible to use the rpart package, and in that case
how? Otherwise, is there another alternative?
This is what I've tried so far
> rpart(LT50_NA ~ Raf + Antho, data=decTreeNA, method=anova) # Have tried
> "method=class" as well
Error in as.character(x) :
cannot coerce type 'closure' to vector of type 'character'
Best regards,
Joel
_________________________________________________________________
Lagra alla dina foton på Skydrive. Det är enkelt och säkert!
http://www.skydrive.live.com
[[alternative HTML version deleted]]
______________________________________________
[email protected] 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.