[BioC] a bug in the function pamr.plotcen()
Martin Morgan
mtmorgan at fhcrc.org
Tue Jun 7 15:26:49 CEST 2011
Hi Alex -- Thanks for the report and reproducible example; see the
comment below...
On 06/06/2011 11:33 AM, Alogmail2 at aol.com wrote:
>
> 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)
Try
mydata <- list(x=x,y=y, genenames=as.character(1:1000))
I arrived at this by looking at ?pamr.plotcen and knowing that the
examples have to work for the package to be available for biocLite.
Martin
>> 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]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
--
Computational Biology
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109
Location: M1-B861
Telephone: 206 667-2793
More information about the Bioconductor
mailing list