Skip to content

update.packages()

5 messages · Andrew C. Ward, Jason Turner, Uwe Ligges +1 more

#
Dear R users,

I am using R Version 1.3.0 (2001-06-22) under Windows 2000 Professional (SP 2).

When I try "Packages"->"Update packages from CRAN"
the result is something like 
   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'

Opening the same URL in Internet Explorer opens PACKAGES okay. I had the 
impression (perhaps fanciful) that R used the same settings as IE. I'm less 
than knowledgeable about (among other things) proxies and sockets etc, but 
would greatly value your advice on getting this very handy feature working.

Thank you very much!

Regards,

Andrew C. Ward

Department of Chemical Engineering
The University of Queensland
Brisbane Qld 4072 Australia
andreww at cheque.uq.edu.au
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
IE is just another progam.  You have to set up any other program 
(Netscape, Opera, CuteFTP, etc) with all the local config info, no
matter how IE is set up.  This is overall a good thing, but an 
occasional PITA, as you're discovering.

Without knowing more about your system & network setup, it's hard to
say.   Two posibilities that spring to mind are:

1) firewall/proxy iterference.
2) a *really* slow local DNS server and proxy, which exceeded the
default 60 second timeout

If you are behind a proxy, here's the short story... 

install.packages() uses download.file().  
?download.file() will tell you how download.file() uses the 
environment variables ftp_proxy and http_proxy to get its
proxy info.

And this is where I stop talking -- I know nothing about how
to set environment variables under any of the Windows OS family.
Anyone?
It is a *very* handy feature.  Kudos to those who wrote it.

Cheers

Jason
#
On Wed, 1 Aug 2001, Andrew C. Ward wrote:

            
Try replacing modules/internet.dll by modules/internet2.dll.  Then it will
use the same settings as Internet Explorer.  (The docs for 1.3.0 did not
get updated.)  But what is there should work unless you need a proxy.

Do you need a proxy?  If so the correct info is

  Proxies can be specified via environment variables.
  Setting \code{"no_proxy"} stops any proxy being tried.
  Otherwise the setting of \code{"http_proxy"} or \code{"ftp_proxy"}
  (or failing that, the all upper-case version) is consulted and if
  non-empty used as a proxy site.  For FTP transfers, the username
  and password on the proxy can be specified by \code{"ftp_proxy_user"}
  and \code{"ftp_proxy_password"}.


Note that as I don't need a proxy, it is very hard for me to test that any
of this works as documented.
#
"Andrew C. Ward" wrote:
The default for downloading files is "internal" since R-1.3.0.
For Windows 2000, you need to use the library 
 ...\rw1030\modules\internet2.dll 
instead of 
 ...\rw1030\modules\internet.dll. 
Simply rename the two files.
"The default internet module modules\internet.dll is built using basic
WinSock calls.  There is an alternative modules\internet2.dll which uses
WinInet calls (and so needs Internet Explorer installed) which can be
used as a replacemnet."


If you have wget installed on your system, you can also use 
  update.packages(method="wget")


Uwe Ligges
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
On Wed, 1 Aug 2001, Uwe Ligges wrote:

            
I use internet.dll happily on both my Windows 2000 systems.

As ever with Windows, what works seems capricious, which is why there is an
alternative.  In my tests internet.dll was slightly more reliable than
internet2.dll.