Question

I have recently, set up an AWS accountand am in the process of uploading R packages I require

The process runs smoothly with CRAN packages using the command e.g.

sudo su ­ ­c "R ­e \"install.packages('ggplot2', repos='http://cran.rstudio.com/')\""

For non-CRAN packages, I got some help from this source https://github.com/hadley/devtools/issues/414 and tried

Rscript -e 'library(devtools); library(methods); install_github(commandArgs(TRUE))' "ramnathv/rCharts"

The zipped package (and others on github ) download but then I get the error

'lib="/usr/local/lib/R/site-library"' is not writable . 

although that is where the R packages were written to

Has anyone successfully achieved this process and could give me the solution Tx

Était-ce utile?

La solution

It looks like you just need sudo to install to that directory. You could try

sudo Rscript -e 'library(devtools); library(methods); install_github(commandArgs(TRUE))' "ramnathv/rCharts"

or

git clone https://github.com/ramnathv/rCharts.git
sudo R CMD INSTALL rCharts
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top