Dear all, I'm getting an error in one of the stock examples in the 'mvpart' package. I tried:
require(mvpart) data(spider) fit3 <- rpart(gdist(spider[,1:12],meth="bray",full=TRUE,sq=TRUE)~water+twigs+reft+herbs+moss+sand,spider,method="dist") #directly from ?rpart summary(fit3) ...which returned the following: Error in apply(formatg(yval, digits - 3), 1, paste, collapse = ",", sep = "") : dim(X) must have a positive length This seems to be a problem with the cross-validation, since the "xerror" and "xstd" columns are missing from the summary table as well. Using the mpart() wrapper results in the same error: fit4<-mvpart(gdist(spider[,1:12],meth="bray",full=TRUE,sq=TRUE)~water+twigs+reft+herbs+moss+sand,spider,method="dist") summary(fit4) Note, changing the 'method' argument to ="mrt" seems, superficially, to solve the problem. However, when the dependent variable is a dissimilarity matrix, shouldn't method="dist" be used (as per the examples)? Thanks, in advance, for any help on this error. Oliver ______________________________________________ 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.