hello, I am encoutering problems with a function of R. The function is for classification trees.
I am working on datas of this kind: X1 X2 X3 X4 X5 class 1 2.092 1.902 2.779 2.944 1.946 1 for 200 observations and 4 differents classes. What i would like to do is grow a tree with the function "tree" and then use the result in the function "cv.tree" in order to ran cross validation experiment. > library(tree) > Z<-tree(V1~X1,data) > W<-cv.tree(Z) Error in as.data.frame.default(data) : can't coerce function into a data.frame There is the problem, "cv.tree" won t consider the resluts of function "tree" as an object of class tree, it just considers this object as a data frame. Can anyone eyplain me why or already encoutered this kind of problem? THanks in advance, Nicolas ______________________________________________ [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