Thursday, October 2, 2014

HTTP Proxy settings for R

1) As a non-root user, I want to install my own version of R and its packages. One major problem is how to make it work with a proxy server. Here is what I did on Linux:

- Build and Install R (v3.1.1) on /my_dir/
- $export PATH=/my_dir/bin:$PATH
- $export http_proxy=
- $R
- >options(download.file.method="wget")
- >install.packages("PerformanceAnalytics")
- >install.packages("QRM")
- >install.packages("RQuantLib")
- >install.packages("quantmod")
- >require(quantmod)
- >getSymbols("SPY", src="google")
- >getQuote("GOOG")
- >getSymbols("CPIAUCNS", src="FRED") #load CPI from Fed Reserve
- >getSymbols("GS10", src="FRED")        #load 10y Treasury from Fed
- >getSymbols("SP500", src="FRED")       #load S&P500 from Fed

2) The folowing blog helps me to solve my problem ('407 Proxy Authentication Required') when I called getQuote("SPY") of quantmod.
For the details of downloading file in R, please refer to:

No comments:

Post a Comment