Errors installing RforProteomics and MSnbase packages
Entering edit mode
fgol ▴ 10
Last seen 17 months ago


In installing "RforProteomics" package I faced with the below Error:

> source("")
> library("BiocInstaller")
> biocLite("RforProteomics", dependencies = TRUE)
The downloaded source packages are in
Warning message:
In install.packages(pkgs = doing, lib = lib, ...) :
  installation of package ‘RforProteomics’ had non-zero exit status

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

Then, I tried to install "MSnbase" package. Again, I faced another problem (you can see the below Error):

> biocLite("MSnbase", dependencies = TRUE)
> library("MSnbase")
Loading required package: BiocParallel
Error: package or namespace load failed for ‘MSnbase’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
 there is no package called ‘colorspace’

I am also attaching the output from my sessionInfo():

> sessionInfo() 
R version 3.5.2 (2018-12-20)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
[1] LC_COLLATE=English_United Kingdom.1252  LC_CTYPE=English_United Kingdom.1252   
[3] LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C                           
[5] LC_TIME=English_United Kingdom.1252    
attached base packages:
[1] stats4    parallel  stats     graphics  grDevices utils     datasets  methods   base     
other attached packages:
[1] BiocParallel_1.16.5  BiocInstaller_1.30.0 BiocManager_1.30.4   ProtGenerics_1.14.0 
[5] S4Vectors_0.20.1     mzR_2.16.1           Rcpp_1.0.0           Biobase_2.42.0      
[9] BiocGenerics_0.28.0 
loaded via a namespace (and not attached):
[1] codetools_0.2-16 grid_3.5.2       ncdf4_1.16       impute_1.56.0    tools_3.5.2     
[6] yaml_2.2.0       compiler_3.5.2

I am using a laptop which is connected to my university network. But, I have also the same problem with my own laptop (which in not connected to the university network) when I am trying to install these packages.

Would you please help me what is the problem for? and how can I solve it?

Thank you very much.

RforProteomics MSnbase • 1.5k views
Entering edit mode

In addition to @SamGG's answer, you could also try to set up a different CRAN mirror. Using 0-Cloud [https] (the first option) with chooseCRANmirror() allows me to run BiocManager::install("colorspace") successfully.

Entering edit mode
shepherl 2.8k
Last seen 2 days ago
United States

It seems you are missing the package colorspace . Please install that package first and then try the other two installation calls. It is worth noting that biocLite is deprecated , Please start installing Bioconductor packages through BiocManager.

BiocManager::install("colorspace", dependencies = TRUE)
BiocManager::install("RforProteomics", dependencies = TRUE)
BiocManager::install("MSnbase", dependencies = TRUE)

In might also be worth running the validity check to ensure all your packages are up-to-date for your R/Bioc versions

Entering edit mode

Dear Shepherl,

Thank you so much for your advise. Now, both packages are working. Thanks

Entering edit mode
SamGG ▴ 270
Last seen 29 days ago

Hi, With R3.5.2, you should use the new installer delivered by the BiocManager package. More on that The MSnbase is a dependency of RforProteomics, so no need to install it separately.

> BiocManager::install("RforProteomics")
Bioconductor version 3.8 (BiocManager 1.30.4), R 3.5.1 (2018-07-02)
Installing package(s) 'RforProteomics'
also installing the dependencies ‘ncdf4’, ‘mzR’, ‘ProtGenerics’, ‘pcaMethods’, ‘MALDIquant’, ‘mzID’, ‘MSnbase’, ‘biocViews’

The error you report misleads you in fact. When you load the MSnbase package (that seems correctly installed), the error tells that R can't load/find the colorspace package. This package should have been installed with RforProteomics, but sometimes things are getting weird. What you should do now is to install this CRAN package.


Right now, I encountered the following warning, but the installation succeeded because the installer switch to another repository.

Warning in install.packages :
  unable to access index for repository
  cannot open URL ''

To verify colorspace installation, type the following. If no message, everything went fine.


Once correct, start again with MSnbase or RforProteomics. Important note: because you R session might have already loaded some libraries, it's better to restart the R session in order to start with no data and no library loaded. Loaded packages could no be reinstalled because they already reside in memory. R restart could be achieved in RStudio with Shift+Ctrl+F10.


Entering edit mode

Dear SamGG,

Many thanks. Now, they are working fine with BiocManager. Thanks a lot.


Login before adding your answer.

Traffic: 217 users visited in the last hour
Help About
Access RSS

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

Powered by the version 2.3.6