[R] http proxies: setting and unsetting

matt.pettis at thomson.com matt.pettis at thomson.com
Wed May 30 03:49:16 CEST 2007


Hi,

I am trying to use R at work and at home on the same computer.  At work, I have a proxy, and at home, I do not.  I have, for work, a User environment variable "http_proxy" which I set in the OS (Windows XP Pro).  When I am at work, and I try to retrieve data from the web with 'read.csv', things work just fine.  I assume it knows how to use the proxy.

The trouble is when I am at home and have no proxy, R still tries to use my work proxy.  I have tried the following:

Sys.setenv("http_proxy"="")
Sys.setenv("no_proxy"=TRUE)
Sys.setenv("no_proxy"=1)

none of which seems to work.  Whenever I try to use read.csv, it tells me that it cannot find my work proxy, which I am trying to tell R to ignore.

I can solve this problem by removing the http_proxy environment variable binding in the OS when at home, but that is a pain, because then I have to reset it when I go back into work.

Is there a way to tell R within a session to ignore the proxy?  If so, what am I doing wrong?

thanks,
matt



More information about the R-help mailing list