Werner Wernersen
2006-Nov-08 23:58 UTC
[R] Can I set the proxy server and authentification from within R?
Hi, I am using Tinn-R and somehow I cannot point it to start a R shortcut with http_proxy settings including authentification. It always shows the .exe. Is there any way to set the proxy from within R or any other ideas how to do it? I am using R 2.4 for Windows. Thanks a million, Werner
Prof Brian Ripley
2006-Nov-09 07:05 UTC
[R] Can I set the proxy server and authentification from within R?
On Thu, 9 Nov 2006, Werner Wernersen wrote:> I am using Tinn-R and somehow I cannot point it to > start a R shortcut with http_proxy settings including > authentification. It always shows the .exe. > > Is there any way to set the proxy from within R or any > other ideas how to do it?>From the help file (?download.file)These environment variables must be set before the download code is first used: they cannot be altered later by calling 'Sys.putenv'. so you can for example use .Renviron or .Rprofile to set them (see ?Startup). -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Werner Wernersen
2006-Nov-09 11:58 UTC
[R] Can I set the proxy server and authentification from within R?
Thanks a lot for your help! One more remark if somebody runs into the same problem: The .Renviron file has to be in the correct directory. It can be checked with Sys.getenv('http_proxy') that the settings have been actually read in. The ".Renviron" file looks like this now: http_proxy=http://proxyname.domain.com:8080/ http_proxy_user=username:password Thanks again, Werner