Hello Alice,
you need to add 'geneids' to your list.

this 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=factor(y),geneids=paste("ID",1:1000,sep=""))

train = pamr.train(mydata)
pamr.listgenes(train,mydata,1)


Hope this helps
Giovanni






Giovanni Coppola, MD
Department of Neurology
David Geffen School of Medicine
#2309 Gonda Neuroscience and Genetics Research Center
UCLA
695 Charles E. Young Dr. South
Los Angeles, CA 90095
Tel: (310) 206-9090
Fax: (310) 267-2401
gcoppola@ucla.edu


On May 16, 2007, at 9:34 AM, Alice LE BARS wrote:

> Dear all,
>
> I have trouble using the pamr.listgenes function in pamr package.  
> When I
> try to use it, I have the following error :
> Error in dimnames(res) <- list(NULL, c("id", gnhdr, schdr)) :
>         length of 'dimnames' [2] not equal to array extent
> I check if it was my data, but using the example for generating the  
> data,
> the problem remain.
> Did someone have an idea?
>
> I use a limited dataset of 12 samples and 14 genes
>
> # With my originaly data
> Val =
> matrix(as.numeric(unlist(tableEntr[2:dim(tableEntr)[1],2:dim 
> (tableEntr)[2]])),nrow=(dim(tableEntr)[1]-1))
> LabelClasse = rep(c("CR","TOL"), each=6 )
> ListeW = list(x=Val,y=LabelClasse)
>
> entrainement = pamr.train(ListeW)
> pamr.listgenes(entrainement,ListeW,1)
>
> #with the example
> set.seed(120)
> x <- matrix(rnorm(1000*20),ncol=20)
> y <- sample(c(1:4),size=20,replace=TRUE)
> mydata <- list(x=x,y=factor(y))
>
> train = pamr.train(mydata)
> pamr.listgenes(train,mydata,1)
>
>
> Thanks for help
>
> Alice.
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor@stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/ 
> gmane.science.biology.informatics.conductor


	[[alternative HTML version deleted]]

