I am trying to select the top 50 genes with the largest t statistic using
library(golubEsets)
data("Golub_Merge")
I am trying to use the mt.teststat command to get the t statistics and keep getting an error message
Error in as.vector(data) :
no method for coercing this S4 class to a vector.
I thought I created a vector with 1's for ALL and 0's for AML
Golub_Merge.1<-Golub_Merge[,order(Golub_Merge$ALL.AML)]
> Golub_Merge.1$ALL.AML
[1] ALL ALL ALL ALL ALL ALL ALL ALL ALL
[10] ALL ALL ALL ALL ALL ALL ALL ALL ALL
[19] ALL ALL ALL ALL ALL ALL ALL ALL ALL
[28] ALL ALL ALL ALL ALL ALL ALL ALL ALL
[37] ALL ALL ALL ALL ALL ALL ALL ALL ALL
[46] ALL ALL AML AML AML AML AML AML AML
[55] AML AML AML AML AML AML AML AML AML
[64] AML AML AML AML AML AML AML AML AML
Levels: ALL AML
class<-c(rep(1, times=47), (rep(0, times=25)))
> class
[1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
[20] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
[39] 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
[58] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
What is supposed to go in the class label part?
What am I doing wrong?
You showed us the error, but not the code that produced it. Could you show the rest of the code?