[BioC] screeplot in package pcaMethods fails

Wolfgang Huber huber at ebi.ac.uk
Fri Dec 12 00:41:48 CET 2008


Hi Yury,

thank you. As far as I can tell, no "screeplot" method is defined by the 
pcaMethods package, so you would be falling back on 
stats:::screeplot.default, whose implementation indeed asks for x$sdev 
and probably is what throws the error that you report (remember next 
time to add the output of "traceback()" to your error message).

Perhaps the pcaMethods package documentation could be clarified 
regarding the existence and/or usage of a "screeplot" method.
(Typing "class ? pcaRes" currently tells you that such a method exists.)

Best wishes
      Wolfgang

----------------------------------------------------
Wolfgang Huber, EMBL-EBI, http://www.ebi.ac.uk/huber


Yury Bukhman ha scritto:
> Hi,  
> 
> I have created a pcaRes object using pcaMethods.  slplot works OK, but 
> screeplot fails with this error:
> 
> R> screeplot(kubo1.pca)
> Error in x$sdev : $ operator not defined for this S4 class
> 
> More info below.
> 
> R> class(kubo1.pca)
> [1] "pcaRes"
> attr(,"package")
> [1] "pcaMethods"
> 
> R> print(kubo1.pca)
> svd calculated PCA
> Importance of component(s):
>                  PC1    PC2    PC3     PC4
> R2            0.4585 0.2713 0.1381 0.04216
> Cumulative R2 0.4585 0.7299 0.8680 0.91014
> 11405 	Variables
> 12 	Samples
> 0 	NA's
> 4 	Calculated component(s)
> Data was mean centered before running PCA 
> Scores structure:
> [1] 12  4
> Loadings structure:
> [1] 11405     4
> 
> R> sessionInfo()
> R version 2.8.0 (2008-10-20) 
> x86_64-redhat-linux-gnu 
> 
> locale:
> LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;
> LC_COLLATE=en_US.UTF-8;LC_MONETARY=en_US.UTF-8;
> LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;
> LC_NAME=en_US.UTF-8;LC_ADDRESS=en_US.UTF-8;
> LC_TELEPHONE=en_US.UTF-8;LC_MEASUREMENT=en_US.UTF-8;
> LC_IDENTIFICATION=en_US.UTF-8
> 
> attached base packages:
> [1] splines   tools     stats     graphics  grDevices utils     datasets 
> [8] methods   base     
> 
> other attached packages:
>  [1] simpleaffy_2.16.1    genefilter_1.20.1    survival_2.34-1     
>  [4] pcaMethods_1.18.0    pls_2.1-0            MASS_7.2-44         
>  [7] affyPLM_1.16.0       gcrma_2.12.1         matchprobes_1.14.0  
> [10] affy_1.18.2          preprocessCore_1.2.1 affyio_1.8.1        
> [13] Biobase_2.0.1        rkward_0.4.9        
> 
> loaded via a namespace (and not attached):
> [1] annotate_1.18.0     AnnotationDbi_1.4.2 DBI_0.2-4          
> [4] grid_2.8.0          lattice_0.17-15     latticeExtra_0.5-4 
> [7] RSQLite_0.7-0      
> 
> Thanks.
> 
> Yury



More information about the Bioconductor mailing list