This is a test version of Biostars. For the public version, visit https://www.biostars.org.
error in drawing PCA plot

Hi, I can't draw PCA plot by this command. The following error massage appeared. I appreciated for any one help.

mydata <- ReadAffy()
eset <- rma(mydata)
plotPCA(eset, groups=as.numeric(pData(mydata)[,2]), groupnames=levels(pData(mydata)[,2]))

Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘plotPCA’ for signature ‘"ExpressionSet"’

r

Try library("affy") first.

I previously install and load affy packages, however I see that error!

You need to load the library in every R session you start.

Please add the result of sessionInfo()

These are the result of sessionInfo()

> library(affycoretools)
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : 
  there is no package called ‘Rcpp’
Error: package or namespace load failed for ‘affycoretools’
> sessionInfo()
R version 3.2.3 (2015-12-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

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] parallel  stats     graphics  grDevices utils     datasets 
[7] methods   base     

other attached packages:
[1] cluster_2.0.3       limma_3.26.9        affy_1.48.0        
[4] Biobase_2.30.0      BiocGenerics_0.16.1

loaded via a namespace (and not attached):
[1] zlibbioc_1.16.0       BiocInstaller_1.20.3 
[3] DBI_0.7               tools_3.2.3          
[5] affyio_1.40.0         preprocessCore_1.32.0
[7] stats4_3.2.3

Your affycoretools installation is broken. That's where the plotPCA() function that you're trying to use should be coming from. If you fix that then it'll work.

Thank you Ryan, do you know how can I fix that? maybe I should install this package as computer administrator?!

I assume it's installed as your user, so try uninstalling and reinstalling (also as your user). Presumably you'll get an error message upon reinstallation that's informative.

0 answers

No answers yet.

Log in to answer this question.