简体   繁体   中英

Cannot install R packages within WRDS Interactive R session

I would like to install the R package 'rstan' in an interactive R session on the WRDS server, but cannot manage to install it, or any other packages.

I have tried specifying the CRAN mirrors directly in the install.packages() command.

I have tried the following within an interactive WRDS session:

install.packages("rstan", dep= T)

Actual results:

install.packages("rstan", dep= T)

Installing package into '/usr/local/sas/grid/R-3.5.1-linux-library' (as 'lib' is unspecified) Warning in install.packages("rsta", dep = T): 'lib = "/usr/local/sas/grid/R-3.5.1-linux-library"' is not writable Would you like to use a personal library instead? (yes/No/cancel)

yes

--- Please select a CRAN mirror for use in this session ---

Then after I pick any mirror, I get:

Warning: unable to access index for repository http://wbc.upm.edu.my/cran/src/contrib : cannot open URL ' http://wbc.upm.edu.my/cran/src/contrib/PACKAGES ' Warning messages: 1: In download.file(url, destfile = f, quiet = TRUE): URL ' https://cran.r-project.org/CRAN_mirrors.csv ': status was 'Couldn't connect to server' 2: package 'rstan' is not available (for R version 3.5.1)

One option might be to install using the RStudio Server interface (available here ). This puts the installed library in the same location that "regular R" uses on the WRDS server. (For me, that's given by the line below.)

That said, when I tried installing rstan in this way a moment ago, I got an error message ( dependency 'V8' is not available for package 'rstan' ); some R packages require things that cannot be installed within R.

[iangow@wrds-cloud-login1-w 3.6]$ pwd
/home/unimelb/iangow/R/x86_64-redhat-linux-gnu-library/3.6

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM