On Wed, 2005-01-12 at 15:17 +0100, [EMAIL PROTECTED] wrote: > hi, > > I am trying to grow a classification tree on some data, but I have a little > problem. In order to do so I have to use a function like "tree" in R and on > the > internet help(tree) I get the following: > > "The left-hand-side (response) should be either a numerical vector when a > regression tree will be fitted or a factor, when a classification tree is > produced" > > I would like to know what is a "factor" in R, is it numerical value with no > formula or just a word?? > > Thanks in advance > Nicolas
See ?factor and/or Chapter 4 "Ordered and Unordered Factors" in "An Introduction to R". Also, you might want to look into the 'rpart' package for an alternative to 'tree'. rpart is included in the base R distribution: library(rpart) ?rpart HTH, Marc Schwartz ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html