How to set up an alternate R packages library in a writable location on Ubuntu
I am having problem installing some R packages on Ubuntu OS. I have tried a number of suggested solutions on various blogs and SO answers, but the problem persists.
The default for installing packages is 'lib = "/usr/lib/R/library"'
Using Commands
source("http://bioconductor.org/biocLite.R")
biocLite('affycoretools')
Failed because it is 'lib = "/usr/lib/R/library"'
not a writable location (note that I have sudo access). So I want these packages to be installed in this writable location:
lib='/home/b3053674/R/x86_64-pc-linux-gnu-library/3.2'
So the first thing I try:
biocLite('affycoretools,lib=lib)
It seems to work, but now:
library(affycoretools)
#try specifying location
library(affycoretools,lib=lib)
#try alternative keyword - just in case
library(affycoretools,lib.loc=lib)
all fail <<26>.
Then I tried this answer , which assumes that I am creating a variable R_LIBS_USER
. So I used export R_LIBS_USER="/home/b3053674/R/x86_64-pc-linux-gnu-library/3.2"
and tried again, but it didn't seem to do anything. I also tried putting this variable in a file in the home directory called .Renviron
, which also does nothing. I tried to point the new library path to the R_LIBS
environment variable , but again nothing. I've also tried several other solutions regarding functions .libPaths()
and .Library
/ variables, but no joy ...
I guess this type of configuration is pretty common for people who know R, but everything I try seems to fail, so my question is, can anyone give me clear and concise instructions on how to create an alternate write library for mine bioconductor packages in R on Ubuntu 16.04.1
OS?
source to share
No one has answered this question yet
See similar questions:
or similar: