Question: calling SAM using siggenes package
gravatar for Aedin Culhane
13.6 years ago by
Aedin Culhane310
Aedin Culhane310 wrote:
Dear Saran, When you use scan("testdata.txt"), the data is not read in as a matrix. It is read in as a vector. Try class(data) or length(data) to see. You will need to convert the vector into a matrix.<-matrix(scan("testdata.txt"), byrow=TRUE, ncol=6) Alternative try using<-read.table("testdata.txt", row.names=1, header=T) # assuming gene/array labels in first col and row check this using dim( and class( The number of col, ncol(data) should equal the length(cl). Hope this helps, Aedin So in R I do scan data as follow: > data<-scan("testdata.txt") Then for cl argument, it is a vector containing the class labels of the samples. In this case I set the cl as follows: > cl<-c(0,0,0,1,1,1) So I went ahead and execute sam as follows: So I went ahead and execute sam as follows: > samdata<-sam(data,cl) Then I got the following error: Error in data[, c(x,y)] : incorrect number of dimensions. Any advice on this will be greatly appreciated.
ADD COMMENTlink written 13.6 years ago by Aedin Culhane310
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 83 users visited in the last hour