Dear list members, I can't figure out how to specify the contriburl argument to install.packages() properly when the packages to be installed are in a directory on my local machine. I have in mind a command something like install.packages(missing.packages, contriburl=directory, lib=.libPaths()[1]) Where missing.packages is a character vector of package names (without versions) and directory is the location where they reside (less PACKAGES, I guess). I'm using R version 1.9.1 on a Windows XP machine. Several variations on directory <- "file:c:/temp" don't seem to work. Any help would be appreciated. John
Would this work for you? install.packages(pathtopackagezipfile, CRAN = NULL) Although, you can only do one at a time, I think. -roger John Fox wrote:> Dear list members, > > I can't figure out how to specify the contriburl argument to > install.packages() properly when the packages to be installed are in a > directory on my local machine. I have in mind a command something like > > install.packages(missing.packages, contriburl=directory, > lib=.libPaths()[1]) > > Where missing.packages is a character vector of package names (without > versions) and directory is the location where they reside (less PACKAGES, I > guess). I'm using R version 1.9.1 on a Windows XP machine. Several > variations on directory <- "file:c:/temp" don't seem to work. > > Any help would be appreciated. > > John > > ______________________________________________ > R-help at 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 >
On Thu, 15 Jul 2004 10:09:46 -0400, "John Fox" <jfox at mcmaster.ca> wrote :>Dear list members, > >I can't figure out how to specify the contriburl argument to >install.packages() properly when the packages to be installed are in a >directory on my local machine. I have in mind a command something like > > install.packages(missing.packages, contriburl=directory, >lib=.libPaths()[1]) > >Where missing.packages is a character vector of package names (without >versions) and directory is the location where they reside (less PACKAGES, I >guess). I'm using R version 1.9.1 on a Windows XP machine. Several >variations on directory <- "file:c:/temp" don't seem to work. > >Any help would be appreciated.You need a file called PACKAGES in the same directory as the packages, which contains the package information; for example http://www.cran.mirrors.pair.com/bin/windows/contrib/1.9/PACKAGES I imagine the CRAN maintainers have scripts to produce this from the package files, but I'm not sure where they are. To refer to a local version of this file, use the syntax you had, e.g. CRAN.packages(contriburl="file:c:/temp") will look for c:/temp/PACKAGES and display the information in it. If you don't want to maintain this file, then you can construct the information in it using the "available=" argument to the package functions. Duncan
Seemingly Similar Threads
- local source packages install from within R session - cross-platform
- Help Updating and Installing R Packages
- contributed packages not found
- update.packages() as ordinary user, /usr/lib/R/site-library is not writable
- problem with install.packages and update.packages