error in drawing PCA plot
0
2
Entering edit mode
6.9 years ago
hassanlou110 ▴ 40

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 • 4.9k views
ADD COMMENT
0
Entering edit mode

Try library("affy") first.

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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

Please add the result of sessionInfo()

ADD REPLY
0
Entering edit mode

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
ADD REPLY
1
Entering edit mode

Don't use plotPCA(). Use base R code: A: PCA plot from read count matrix from RNA-Seq

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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.

ADD REPLY

Login before adding your answer.

Traffic: 2015 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6