Hi,
  Has anybody used the SAM R package? I followed the pdf of the instruction and try to use the examples on the pdf file to test the code. However, I am having a problem with running the code, below is the code I am running:


library(samr)
set.seed(100)

x<-abs(matrix(rnorm(1000*20),ncol=20))
dd<-sample(1:1000,size=100)
u<-matrix(2*rnorm(100),ncol=10,nrow=100)
x[dd,11:20]<-x[dd,11:20]+u
y<-c(rep(1,10),rep(2,10))
data=list(x=x,y=y,geneid=as.character(1:nrow(x)),genenames=paste("g",as.character(1:nrow(x))))
samr.obj = samr(data, resp.type="Two class unpaired", nperms=100)

I don't have any problem until the last line, when I was running the last line, it complains:

perm= 1
Error in if (logged2) { : argument is of length zero

I don't know what's wrong, I copied the code from the pdf file and run it. It supposed to run. Does anybody know how to solve this problem?

  Many thanks,
  James

 		
---------------------------------

	[[alternative HTML version deleted]]

