Have you tried using classifly directly? library(classifly) classifly(Tumor ~ ., my.data.set, lda)
generate_classification_data is an internal function, and you are passing it the wrong arguments. Hadley On 8/7/07, Dani Valverde <[EMAIL PROTECTED]> wrote: > Hello, > I am trying to explore a classification with GGobi. I am trying to > generate additional data according to the model so I can draw the > decision boundaries on the GGobi plot. The problem is that I always get > the same error: Error in predict.lda(model,data): wrong number of > variables, even if I know that I used the same number of variables for > the model generation (6) and for the additional data generation (6 > also). I paste the code I am using: > > library(MASS) > Tumor <- c(rep("MM",20),rep("GBM",18),rep("LGG",17)) > data.lda <- lda(data,Tumor) > data.ld <- predict(data.lda) > data.ldd <- data.frame(data.ld$x,data.ld$class) > > library(rggobi) > data.g <- ggobi(data.ldd) > > library(classifly) > generate_classification_data(data.lda,data,method="grid",n=100000) > > Could you help me? > Best regards, > > Dani > > > > > [[alternative HTML version deleted]] > > ______________________________________________ > 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 > and provide commented, minimal, self-contained, reproducible code. > ______________________________________________ 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 and provide commented, minimal, self-contained, reproducible code.