1

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)

txinferno
  • 85
  • 5
  • you might be facing problem with firewall restriction, try opening the url in a browser to check if the link is accessible to you. – Hunaidkhan Dec 26 '18 at 08:23
  • Thank you. Yes I can open the URLs on my laptop; but perhaps the issue is on the WRDS side of it. – txinferno Dec 26 '18 at 12:49

1 Answers1

0

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
Ian Gow
  • 3,098
  • 1
  • 25
  • 31