[Rd] install.packages question / suggestion

From: Thomas Stabla <statho3_at_web.de>
Date: Sat 23 Oct 2004 - 03:05:30 EST


when trying to write an R-file, which automatically installs and updates a given list of packages, I had two problems with install.packages()

  1. install.packages("<package>") will install <package>, no matter if <package> has already been installed.
  2. the readline() at the end of install.packages, which asks the user, if the downloaded files should be deleted, makes it difficult to delete packages automatically after installation (I must admit, I'm not quite familiar with R CMD BATCH)

Is the behaviour in 1) intended?
2) I'd like to have another bool argument, which determines, if the downloaded files should be deleted.

To change 1) I've made a small change to


adding one line and moving another one. Here's the diff output

+ pkgs <- pkgs[ ! pkgs %in% have ]

     foundpkgs <- download.packages(pkgs, destdir = tmpd, available = available,
                                    contriburl = contriburl, method = method)

Best Regards,
Thomas Stabla

R-devel@stat.math.ethz.ch mailing list
Received on Sat Oct 23 03:12:26 2004

This archive was generated by hypermail 2.1.8 : Fri 18 Mar 2005 - 09:00:54 EST