[Rd] package installation order

Kuhn, Max Max.Kuhn at pfizer.com
Wed Nov 14 17:35:05 CET 2007


Professor Ripley,

> You need the information from available.packages() to do the ordering,
so 
> you need a non-NULL repository.  This works if you convert your local 
> collection into a local repository. You will need a PACKAGES file, but

> tools::write_PACKAGES can re-create one for you.
> 
> There are also dependency tools in package tools and on BioC.

This is probably a better option for me given that my source files are a
little out of date. I couldn't get it to work though.

I put the tar.gz files into a sub-directory (./src/contrib)

I ran write_PACAKGES referencing that directory and type = "source" and
verbose = TRUE. No error messages were given and it resulted in PACKAGES
and PACKAGES.gz files that appeared to have all the right info in it.

I figured out the package names by parsing the names of the tar.gz
files.

I then ran 

   install.packages(pckList[1:3],
      repos = "/home/max/tmp/r-2.5.1-pkgs-updated/src/contrib",
      contriburl = "/home/max/tmp/r-2.5.1-pkgs-updated/src/contrib",
      type = "source")

No packages were installed and I had the warnings:

Warning: unable to access index for repository
/home/max/tmp/r-2.5.1-pkgs-updated/src/contrib
Warning message:
packages 'Cairo', 'Design', 'ElemStatLearn' are not available in:
install.packages(pckList[1:3], repos =
"/home/max/tmp/r-2.5.1-pkgs-updated/src/contrib",  

(those particular packages are in ./src/contrib.) I also tried different
variations of using the file names etc.

I'm assuming that I don't have a proper repository. Am I missing
something obvious here and/or is there some documentation on what the
elements of a repository are?

Thanks again,

Max



More information about the R-devel mailing list