[BioC] pamr Error: each class must have >1 sample
Dick Beyer
dbeyer at u.washington.edu
Wed Jul 28 21:25:36 CEST 2004
I am having trouble with pamr.train and subsequently pamr.cv.
In the pamr documentation, the following works:
set.seed(120)
x <- matrix(rnorm(1000*20),ncol=20)
y <- sample(c(1:4),size=20,replace=TRUE)
mydata <- list(x=x,y=y)
mytrain <- pamr.train(mydata)
mycv <- pamr.cv(mytrain,mydata)
But if you change the seed, it doesn't:
set.seed(1123)
x <- matrix(rnorm(1000*20),ncol=20)
y <- sample(c(1:4),size=20,replace=TRUE)
mydata <- list(x=x,y=y)
mytrain <- pamr.train(mydata)
Error in nsc(data$x[gene.subset, sample.subset], y = y, proby = proby, :
Error: each class must have >1 sample
There is discussion in the documents (http://www-stat.stanford.edu/~tibs/PAM/Rdist/doc/readme.html) about "fragile" functions, but I have not been able to understand how to make this error go away. If anyone has had this problem or has some advice, I would be eternally grateful.
Thanks very much,
Dick
*******************************************************************************
Richard P. Beyer, Ph.D. University of Washington
Tel.:(206) 616 7378 Env. & Occ. Health Sci. , Box 354695
Fax: (206) 685 4696 4225 Roosevelt Way NE, # 100
Seattle, WA 98105-6099
http://depts.washington.edu/ceeh/ServiceCores/FC5/FC5.html
More information about the Bioconductor
mailing list