Question: R:Cannot install snpStats packages
0
gravatar for zwang10
3.0 years ago by
zwang100
United States
zwang100 wrote:

I follow the instruction from https://www.bioconductor.org/install/. But I got error as following

> source("http://bioconductor.org/biocLite.R")
Warning in install.packages("BiocInstaller", repos = a["BioCsoft", "URL"]) :
  'lib = "/share/apps/R/3.1.1/intel/2013.0.028/lib64/R/library"' is not writable
Error in install.packages("BiocInstaller", repos = a["BioCsoft", "URL"]) : 
  unable to install packages
Calls: source ... eval.parent -> eval -> eval -> eval -> eval -> install.packages
Execution halted

Can someone help me here?

bioconductor R • 2.5k views
ADD COMMENTlink modified 3.0 years ago by Guangchuang Yu2.2k • written 3.0 years ago by zwang100

Follow this:

#To install core packages:
source("https://bioconductor.org/biocLite.R")
biocLite()
#To install specific packages
source("https://bioconductor.org/biocLite.R")
biocLite("snpStats")
ADD REPLYlink modified 3.0 years ago • written 3.0 years ago by Pranavathiyani G240
3
gravatar for Guangchuang Yu
3.0 years ago by
Guangchuang Yu2.2k
China/Guangzhou/Southern Medical University
Guangchuang Yu2.2k wrote:

'lib = "/share/apps/R/3.1.1/intel/2013.0.028/lib64/R/library"' is not writable

Obviously, you don't have the permission to install package to the R library folder.

  1. add the following lines to ~/.Renviron: R_LIBS_USER='~/R/library'

  2. try again:

source("https://bioconductor.org/biocLite.R")
biocLite("snpStats")

You should be able to install any package you want.

ADD COMMENTlink modified 3.0 years ago • written 3.0 years ago by Guangchuang Yu2.2k

you may need to mkdir -p ~/R/library if it complained that the folder does not exists.

ADD REPLYlink modified 3.0 years ago • written 3.0 years ago by Guangchuang Yu2.2k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 835 users visited in the last hour