Error: package or namespace load failed for...
1
1
Entering edit mode
nickflowcyto ▴ 50
@nickflowcyto-13105
Last seen 7.0 years ago

Hey everyone,

I just started on bioconductor but have been using R for some time now. This error message pops up every time I reopen R, and try to load flowCore, flowViz, and flowStats. 

>library("flowStats", lib.loc="~/R/win-library/3.4")

Loading required package: flowCore
Error: package or namespace load failed for ‘flowCore’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
 there is no package called ‘Rcpp’
Error: package ‘flowCore’ could not be loaded

I checked the versions with BiocInstaller::biocValid() and came back true.

 

Thanks for any help, it is greatly appreciated!!

 

Nick

 

package installation flowviz flowcore rcpp flow cytometry • 16k views
ADD COMMENT
0
Entering edit mode

It is a little unusual to specify lib.loc for library; if Rcpp were installed in a different library (e.g., by your system administrator, or by a different you) then it wouldn't be found. Also, how did you install flowStats? If using BiocInstaller::biocLite("flowStats") (the recommended way) then R would (should?) have installed the Rcpp dependency if it were not already available.

ADD REPLY
1
Entering edit mode

Hi Martin,

Thanks for the reply! I did install flowStats via biocLite("flowStats") through the same user. I just re-ran the bioInstaller code source("https://bioconductor.org/biocLite.R"),, the system asked to update packages, but after quitting the R session and beginning again, the same message came up. Do the bioconductor packages normally work without a reinstallation every time? Thanks again, I really appreciate it.

ADD REPLY
0
Entering edit mode

No need to re-install each time. Did you try and install Rcpp, BiocInstaller::biocLite("Rcpp") ? Does it install successfully? It's not so helpful to say 'the same message came up', better to copy / paste the exact transcript of what you do / what R says (for long installations it is sometimes necessary to trim the transcript, but somehow ironically whenever people trim the transcript they remove the most important part...). Also provide the output of sessionInfo()

ADD REPLY
1
Entering edit mode

Rcpp was successful however flowStats still was not. Here is the full transcript with session info.

BiocInstaller::biocLite("Rcpp")
BioC_mirror: https://bioconductor.org
Using Bioconductor 3.5 (BiocInstaller 1.26.0), R 3.4.0 (2017-04-21).
Installing package(s) ‘Rcpp’
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/Rcpp_0.12.11.zip'
Content type 'application/zip' length 3380155 bytes (3.2 MB)
downloaded 3.2 MB

package ‘Rcpp’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\nickcomp\downloaded_packages
installation path not writeable, unable to update packages: foreign, Matrix
> biocLite(flowStats)
Error in biocLite(flowStats) : could not find function "biocLite"

> sessionInfo()
R version 3.4.0 (2017-04-21)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

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

loaded via a namespace (and not attached):
[1] compiler_3.4.0       BiocInstaller_1.26.0 tools_3.4.0     
ADD REPLY
0
Entering edit mode

And the full transcript for BiocInstaller::biocLite("flowStats") ?

ADD REPLY
1
Entering edit mode

>BiocInstaller::biocLite("flowStats")

BioC_mirror: https://bioconductor.org
Using Bioconductor 3.5 (BiocInstaller 1.26.0), R 3.4.0 (2017-04-21).
Installing package(s) ‘flowStats’
trying URL 'https://bioconductor.org/packages/3.5/bioc/bin/windows/contrib/3.4/flowStats_3.34.0.zip'
Content type 'application/zip' length 8752749 bytes (8.3 MB)
downloaded 8.3 MB

package ‘flowStats’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\nickcomp\downloaded_packages
installation path not writeable, unable to update packages: foreign, Matrix

> sessionInfo()
R version 3.4.0 (2017-04-21)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

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

loaded via a namespace (and not attached):
[1] compiler_3.4.0       BiocInstaller_1.26.0 tools_3.4.0         

 

Isn't this a re-download?
 

ADD REPLY
1
Entering edit mode

Yes, you did just download and install flowStats again, and normally it would not be necessary. But this is the first time the transcript of the session has been shared with others.

So can you now provide the full transcript of

library(flowStats)
.libPaths()
c("flowStats", "Rcpp") %in% dir(.libPaths())

If loading flowStats fails, could you also try (and report) the results of

library(Rcpp)
library(flowStats)
packageDescription("Rcpp")
packageDescription("flowStats")
ADD REPLY
1
Entering edit mode

Martin,

As a new user I had reached my reply limit yesterday. Here is the transcript, flowStats now works! Thank you for your help! I think the missing link was the BiocInstaller::biocLite("Rcpp") earlier.

 

> library(flowStats)

Loading required package: fda
Loading required package: splines
Loading required package: Matrix

Attaching package: ‘Matrix’

The following object is masked from ‘package:flowCore’:

    %&%

Attaching package: ‘fda’

The following object is masked from ‘package:graphics’:

    matplot

Loading required package: cluster
Loading required package: flowWorkspace
Loading required package: ncdfFlow
Loading required package: RcppArmadillo
Loading required package: BH

> .libPaths()
[1] "C:/Users/nickcomp/Documents/R/win-library/3.4"
[2] "C:/Program Files/R/R-3.4.0/library"      
> c("flowStats", "Rcpp") %in% dir(.libPaths())
[1] TRUE TRUE
ADD REPLY
0
Entering edit mode
Jiang, Mike ★ 1.3k
@jiang-mike-4886
Last seen 3.1 years ago
(Private Address)

You need to install `Rcpp` package

ADD COMMENT
0
Entering edit mode

Thanks Mike! I just tried to do this but biocLite is not available either. Does source("https://bioconductor.org/biocLite.R") need to be re-run every time I begin a new session?

> biocLite("Rcpp")
Error in biocLite("Rcpp") : could not find function "biocLite"
 

ADD REPLY
1
Entering edit mode

You can either resource biocLite.R file or 'library(BiocInstaller)` in order to load `biocLite` function. As Martin said, you typically shouldn't need specify `lib.loc`. Also you can check your current lib paths by running `.libPaths()`

ADD REPLY

Login before adding your answer.

Traffic: 925 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