[R] Help installing packages with dependencies for R, behind corporate firewall

jose.nunez-zuleta at barclays.com jose.nunez-zuleta at barclays.com
Wed Jan 14 22:37:17 CET 2015


Hello R-users,

I have no practical experience with the R language itself but I've been tasked to install it behind a corporate firewall. Basic installation seems sane but when my user tries to install a custom library like this:

install.packages("ggplot2")
Installing package into '/home/myuser/rlibs'
(as 'lib' is unspecified)
Warning: unable to access index for repository http://cran.us.r-project.org/src/contrib
Warning message:
package 'ggplot2' is not available (for R version 3.1.2)

See no progress and eventually nothing gets downloaded into my custom directory. My question is, there is a way to add verbosity to R to see if the network proxy setting are working correctly (I can get files using 'wget' without problems under the same account)?

More details about my installation below:

1) I'm behind a firewall with http proxy access. I have no root and made a local installation
2) Contents of my ~/.Renviron:

R_LIBS=/home/myuser/rlibs

3) Contents of ~/.Rprofile:

r <- getOption("repos") # hard code the US repo for CRAN
r["CRAN"] <- "http://cran.us.r-project.org"
options(repos = r)
rm(r)

4) Http environment variable proxy is set (like export http_proxy=XXXXproxy.XXXX.com. I can see it if I do 'Sys.getenv("http_proxy")' from inside the R prompt)

NOTE: I managed to install libraries 'by hand' but for module that have dependencies this doesn't work: 
cd /home/$USER/rlibs/; wget http://cran.us.r-project.org/src/contrib/timeDate_3011.99.tar.gz; /mylocal/R-3.1.2/bin/R CMD INSTALL -l /localrdir timeDate_3011.99.tar.gz

I apologize if this is not the correct list (went through all of them, WIKI and other groups looking for an answer to this issue without much luck).

Thanks,

--Jose
_______________________________________________

This message is for information purposes only, it is not a recommendation, advice, offer or solicitation to buy or sell a product or service nor an official confirmation of any transaction. It is directed at persons who are professionals and is not intended for retail customer use. Intended for recipient only. This message is subject to the terms at: www.barclays.com/emaildisclaimer.

For important disclosures, please see: www.barclays.com/salesandtradingdisclaimer regarding market commentary from Barclays Sales and/or Trading, who are active market participants; and in respect of Barclays Research, including disclosures relating to specific issuers, please see http://publicresearch.barclays.com.



More information about the R-help mailing list