Re: [R] contriburl argument to install.packages

From: Roger D. Peng <rpeng_at_jhsph.edu>
Date: Fri 16 Jul 2004 - 22:14:19 EST

Argh, yes. I forgot I was using R 1.9.0. Everything works correctly in 1.9.1.

-roger

Uwe Ligges wrote:
> Roger D. Peng wrote:
>

>> Hmm...is this maybe a bug?  Check out this section of install.packages():
>>
>>     localcran <- length(grep("^file:", contriburl)) > 0
>>     if (!localcran) {
>>         if (is.null(destdir)) {
>>             tmpd <- tempfile("Rinstdir")
>>             if (!dir.create(tmpd))
>>                 stop("Unable to create temp directory ", tmpd)
>>         }
>>         else tmpd <- destdir
>>     }
>>     foundpkgs <- download.packages(pkgs, destdir = tmpd, available = 
>> available,
>>         contriburl = contriburl, method = method)
>>
>> So if `localcran' is TRUE (which in this case, it is), then `tmpd' 
>> never gets defined but is passed to download.packages().

>
>
> The help pages tells us (correctly):
> "If CRAN is local, i.e., the URL starts with "file:", then the packages
> are not downloaded but used directly."
> hence we don't need a destdir in this case, therefore no need to define
> tmpd.
>
>
>> When I run a traceback() after getting the error from running 
>> install.packages(), it fails in download.packages() when trying to 
>> create the download directory.

>
>
> Works for me without any error. Are you sure the path you specified was
> correct? If you are sure, is this R-1.9.1?
>
> Uwe Ligges


R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Jul 16 22:24:00 2004

This archive was generated by hypermail 2.1.8 : Wed 03 Nov 2004 - 22:55:02 EST