Joao Pedro W. de Azevedo
2003-Feb-16  13:40 UTC
[R] download CRAN packages and proxy config.
Dear R users,
I'm starting to get acquainted with R. I've been reading the manual, and
I
understood that if I wanted to install a user written package on R, I could
do it directly from the Internet, by typing the line
install.packages("quantreg") in an R session.
To my surprise this command did not work, nor did the command "update
packages from CRAN..." from the menu option. In the latter I got the
following error message:
<- CRAN.packages()
+ install.packages(select.list(a[,1],,TRUE), .libPaths()[1], available=a)}
trying URL `http://cran.r-project.org/bin/windows/contrib/PACKAGES'
unable to connect to 'cran.r-project.org'.
Error in download.file(url = paste(contriburl, "PACKAGES", sep =
"/"),  :
        cannot open URL
`http://cran.r-project.org/bin/windows/contrib/PACKAGES'>
The strange thing was that I was able to visit the internet address the R
was trying to connect, from my web browser. Thus I imagine that the problem
was a proxy issue on R.
I would sincerely appreciate if one of the more experience R user could help
me to sort this issue out. I found a way to configure my proxy setting by
typing on the main window '"http://wwwcache.ncl.ac.uk:8080/"',
however it
didn't seem to have worked, as I kept getting the same error message when I
tried to connect the CRAN.
Any help would be extremely appreciated,
Joao Pedro/
"Joao Pedro W. de Azevedo" wrote:> > Dear R users, > > I'm starting to get acquainted with R. I've been reading the manual, and I > understood that if I wanted to install a user written package on R, I could > do it directly from the Internet, by typing the line > install.packages("quantreg") in an R session. > > To my surprise this command did not work, nor did the command "update > packages from CRAN..." from the menu option. In the latter I got the > following error message: > > <- CRAN.packages() > + install.packages(select.list(a[,1],,TRUE), .libPaths()[1], available=a)} > trying URL `http://cran.r-project.org/bin/windows/contrib/PACKAGES' > unable to connect to 'cran.r-project.org'. > Error in download.file(url = paste(contriburl, "PACKAGES", sep = "/"), : > cannot open URL > `http://cran.r-project.org/bin/windows/contrib/PACKAGES' > > > > The strange thing was that I was able to visit the internet address the R > was trying to connect, from my web browser. Thus I imagine that the problem > was a proxy issue on R. > > I would sincerely appreciate if one of the more experience R user could help > me to sort this issue out. I found a way to configure my proxy setting by > typing on the main window '"http://wwwcache.ncl.ac.uk:8080/"', however it > didn't seem to have worked, as I kept getting the same error message when I > tried to connect the CRAN. > > Any help would be extremely appreciated, > > Joao Pedro/Please read Section 2.16 "The internet download functions fail." of the R for Windows FAQ. Uwe Ligges
Joao Pedro W. de Azevedo <jazevedo at provide.com.br> wrote:> install.packages("quantreg") > To my surprise this command did not work... > Error in download.file(url = paste(contriburl, "PACKAGES", sep = "/")...It took me years to figure out how to get through our firewall, from my Solaris 2.6 machine (now) running R-1.6.2. There were 3 crucial steps: 1) In my .Rprofile: options(download.file.method="wget") (The default method "internal" does not seem to work for me.) 2) In my .cshrc: setenv http_proxy <some.proxy.server>:8000 3) <some.proxy.server> is NOT the name I find in my web browser! The web browser knows the machine that serves "Proxy Auto-Configuration" files, but I needed to get the name of an actual proxy server from our local guru. Hope that helps! -- -- David Brahm (brahm at alum.mit.edu)