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

jose.nunez-zuleta at barclays.com jose.nunez-zuleta at barclays.com
Thu Jan 15 15:30:53 CET 2015


Hello all,

Sorry about the first post, I forgot to mention that I am using R on Linux. As Brian suggested I looked closely into the R help and tried the verbose option (> install.packages("ggplot2", verbose = 'true')) but it wasn't very helpful. But after checking 'help(download.file)' I found than my format of the variable http_proxy was wrong and needed to be like this (protocol and port):

http_proxy=http://myproxy.com:80

Downloads now work fine, I hope this saves some time to the next person dealing with this issue.

Thanks for the help!

--Jose

------------------------------

Message: 26
Date: Wed, 14 Jan 2015 16:37:17 -0500
From: <jose.nunez-zuleta at barclays.com>
To: <r-help at r-project.org>
Subject: [R] Help installing packages with dependencies for R, behind
	corporate firewall
Message-ID:
	<34922D8098CB7048A99568D009AF262D0916CD1AE8 at NYKPCMMGMB05.INTRANET.BARCAPINT.COM>
	
Content-Type: text/plain; charset="us-ascii"

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