mzR could not be found
1
1
Entering edit mode
rema ▴ 10
@rema-7110
Last seen 10.1 years ago

Hi

I am new to R and bioconductor but I have installed the latest version of both and have attempted to use xcms. When trying to open xcms I am told that mzR could not be found

library(xcms)
Error: package ‘mzR’ required by ‘xcms’ could not be found
> traceback()
3: stop(gettextf("package %s required by %s could not be found", 
       sQuote(pkg), sQuote(pkgname)), call. = FALSE, domain = NA)
2: .getRequiredPackages2(pkgInfo, quietly = quietly)
1: library(xcms)

I have tried reinstalling mzR with the following message. The location of the binary packages is not available to me which confuses me a bit

biocLite('mzR')
BioC_mirror: http://bioconductor.org
Using Bioconductor version 3.0 (BiocInstaller 1.16.1), R version 3.1.2.
Installing package(s) 'mzR'
also installing the dependencies ‘BiocGenerics’, ‘Rcpp’, ‘Biobase’

trying URL 'http://bioconductor.org/packages/3.0/bioc/bin/windows/contrib/3.1/BiocGenerics_0.12.1.zip'
Content type 'application/zip' length 855784 bytes (835 Kb)
opened URL
downloaded 835 Kb

trying URL 'http://cran.fhcrc.org/bin/windows/contrib/3.1/Rcpp_0.11.3.zip'
Content type 'application/zip' length 3029311 bytes (2.9 Mb)
opened URL
downloaded 2.9 Mb

trying URL 'http://bioconductor.org/packages/3.0/bioc/bin/windows/contrib/3.1/Biobase_2.26.0.zip'
Content type 'application/zip' length 4268946 bytes (4.1 Mb)
opened URL
downloaded 4.1 Mb

trying URL 'http://bioconductor.org/packages/3.0/bioc/bin/windows/contrib/3.1/mzR_2.0.0.zip'
Content type 'application/zip' length 9599492 bytes (9.2 Mb)
opened URL
downloaded 9.2 Mb

package ‘BiocGenerics’ successfully unpacked and MD5 sums checked
package ‘Rcpp’ successfully unpacked and MD5 sums checked
Warning: cannot remove prior installation of package ‘Rcpp’
package ‘Biobase’ successfully unpacked and MD5 sums checked
Warning: cannot remove prior installation of package ‘Biobase’
package ‘mzR’ successfully unpacked and MD5 sums checked
Warning: cannot remove prior installation of package ‘mzR’

The downloaded binary packages are in
        C:\Users\rm\AppData\Local\Temp\Rtmpu0ikzQ\downloaded_packages
Warning message:
installed directory not writable, cannot update packages 'mgcv' 

 

mzR • 3.1k views
ADD COMMENT
1
Entering edit mode

I think it would help to add to your post the output of sessionInfo() and .libPaths(). Also, I wonder if the (apparently?) installed version of mzR (packageDescription("mzR")$Version) and the version of mzR required by xcms (packageDescription("xcms")[c("Depends", "Imports")]). It would be great to get a better understanding of why this problem occurs.

ADD REPLY
0
Entering edit mode
@laurent-gatto-5645
Last seen 9 weeks ago
Belgium

It looks like your have a permission problem on your system. It is a bit odd that the first error says that mzR is not available and then, when installing the package it says that prior installation cannot be removed. It is also surprising that xcms has been installed without mzR.

First, you should make sure that the permissions are right. There are often multiple places, called libraries, where packages can be installed. It is not unreasonable that the library along the R installation is not writeable. In such cases, a user-specific library is created in their home directory (My Document, I believe, on Windows). The .libPaths() function will list the different libraries on your system. Delete, or ask you admin, to delete mzR, Rcpp, Biobase, ... from the non-writeable library and try to re-install.

ADD COMMENT
0
Entering edit mode

I met the same issue. I'm on Windows 7.

I tried to add bioconductor sources to a fresh installation of RStudio 3.1.2:

> source("http://bioconductor.org/biocLite.R")
Bioconductor version 3.0 (BiocInstaller 1.16.1), ?biocLite for help
> biocLite()
BioC_mirror: http://bioconductor.org
Using Bioconductor version 3.0 (BiocInstaller 1.16.1), R version 3.1.2.
Warning message:
installed directory not writable, cannot update packages 'mgcv'

as Laurent suggested, I checked the lib paths:

> .libPaths()
[1] "C:/Users/pheimlic/Documents/R/win-library/3.1" "C:/Program Files/R/R-3.1.2/library"         

and located mgcv as C:/Program Files/R/R-3.1.2/library/mgcv. I removed this directory and was able to proceed with the installation:

> biocLite()
BioC_mirror: http://bioconductor.org
Using Bioconductor version 3.0 (BiocInstaller 1.16.1), R version 3.1.2.
> 
ADD REPLY
0
Entering edit mode

mgcv is a recommended package, which means it will be installed with R (in C:/Program Files/R/R-3.1.2/library, in your case). I don't think it is a good idea to remove it, but that library being not writeable should not stop you installing/updating other packages with biocLite().

ADD REPLY

Login before adding your answer.

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