Dear list members, I am analyzing Affymentrix gene expression data and would like to apply the R package, VarSelRF to identifying small sets of genes that could be used for diagnostic purpose.
Basically, the data matrix is composed of 22277 rows (genes) and 65 columns (samples). I did unsupervised clustering using pvclust to get 4 classes. What I would like to do is to get unique genes for each class which can best characterize them. I did so and had the problem when running the code. The error message is: > rf.vs1 <- varSelRF(exprSet, cl, ntree = 200, ntreeIterat = 100, vars.drop.frac = 0.2) error in randomForest.default(x = xdata, y = Class, ntree = ntree, mtry = mtry, : length of response must be the same as predictors My code is: library(varSelRF) exprSet <- as.matrix(read.table('varSelRF_x.txt',header = FALSE)) cl <- factor(c(rep("C", 2), rep("D", 2), rep("B", 1), rep("A", 1), rep("D", 1), rep("B", 1), rep("C", 2), rep("B", 1), rep("D", 1), rep("A", 1), rep("D", 2), rep("B", 1),rep("A", 1),rep("B", 1), rep("D", 1),rep("B", 1),rep("C", 1),rep("D", 2),rep("C", 2),rep("B", 2),rep("D", 1),rep("C", 1),rep("D", 1),rep("D", 1),rep("C", 1),rep("B", 1),rep("C", 1),rep("A", 1),rep("C", 1),rep("B", 1),rep("D", 3),rep("D", 1),rep("C", 1),rep("B", 2),rep("D", 1),rep("D", 1),rep("B", 2),rep("D", 1),rep("B", 1),rep("C", 1),rep("D", 1),rep("B", 3),rep("D", 5),rep("B", 1),rep("D", 2),rep("B", 1),rep("D", 1))) rf.vs1 <- varSelRF(exprSet, cl, ntree = 200, ntreeIterat = 100, vars.drop.frac = 0.2) rf.vs1 plot(rf.vs1) Would you like to give me some suggestions which could result in the error message? Thank you very much and I am looking forward to your reply! Best Regards, Alex [[alternative HTML version deleted]] ______________________________________________ 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.