 
Dear All,
 
It looks like I found a bug in the function pamr.plotcen() of the  package 
pamr
in this row:
 
genenames <- data$genenames[fit$gene.subset]
 
there is no such name in the output list of pamr.train(mydata)


Thanks
 
Alex
 
 
 
 
 
 
 
 
 
> 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)
123456789101112131415161718192021222324252627282930>  mycv <-  
pamr.cv(mytrain, mydata)
1234Fold 1  :123456789101112131415161718192021222324252627282930
Fold 2  :123456789101112131415161718192021222324252627282930
Fold 3  :123456789101112131415161718192021222324252627282930
Fold 4  :123456789101112131415161718192021222324252627282930
>  pamr.plotcv(mycv)
> pamr.plotcen(mytrain, mydata,threshold=1.6)
Error  in text.default(rep(0, nd), seq(nd), label = g, cex = 0.4, adj = 0,  
:  
zero length 'labels'


>names(mytrain)
[1]  "y"                 "proby"             "yhat"             
[4]  "prob"              "centroids"         "centroid.overall"
[7]  "sd"                "threshold"         "nonzero"         
[10]  "threshold.scale"   "se.scale"          "scale.sd"        
[13]  "call"              "hetero"            "norm.cent"       
[16]  "prior"             "offset"            "sign.contrast"   
[19]  "errors"            "gene.subset"      "sample.subset"   
[22]  "ngroup.survival"  "problem.type"  
 
 
 
 
 
 
 
> sessionInfo()
R version 2.12.2 (2011-02-25)
Platform:  i386-pc-mingw32/i386 (32-bit)
 
locale:
[1] LC_COLLATE=English_United States.1252 
[2]  LC_CTYPE=English_United States.1252   
[3]  LC_MONETARY=English_United States.1252
[4]  LC_NUMERIC=C                           
[5] LC_TIME=English_United States.1252    
 
attached base packages:
[1] splines    tools     stats     graphics   grDevices utils     datasets 
[8] methods    base     
 
other attached packages:
[1]  pamr_1.51       survival_2.36-5  cluster_1.13.3  xtable_1.5-6   
[5] Rmagpie_1.6.0    Biobase_2.10.0  RWeka_0.4-7    
 
loaded via a namespace (and not attached):
[1]  class_7.3-3        e1071_1.5-25       grid_2.12.2       kernlab_0.9-12 
   
[5] rJava_0.8-8       RWekajars_3.7.3-1








	[[alternative HTML version deleted]]

