Skip to content

RFC install.packages() changes

5 messages · Gabor Grothendieck, Kjetil Halvorsen, Brian Ripley

#
install/update.packages() in R-devel has been enhanced in a few ways,
notably to handle multiple repositories, and to allow packages to be 
reinstalled under the current version of R.

1) Currently they will ask if you want to delete the downloaded files (if 
any) *provided* destdir was not specified.  In that case it uses a 
subdirectory of the per-session temporary directory, so the files will be 
deleted at the end of the R session anyway.

We had a request to make the questioning optional.  I propose to remove it 
altogether, and either

a) delete the downloaded files at the end of install.packages or
b) leave them in the per-session directory to be deleted at the end of the 
session.

that is to force answer 'y' or 'n' respectively.  Does anyone see any 
problems with a)?


2) ?packageStatus says

     Summarize information about installed packages and packages
     available at various repositories, and automatically upgrade
     outdated packages. These tools will replace 'update.packages' and
     friends in the future and are currently work in progress.

but `progress' seems to have been at a halt for a long time.  The one
feature I use it for is finding non-installed packages, and we could
easily add a function non_installed.packages() and an option to
install.packages() to add (selectively) uninstalled packages (and a stop
list might be useful, so you do not get repeatedly asked about packages
which fail).

Do people use it, and if so for what purposes and what improvements would 
they like?  (I am thinking of, e.g, ways to extract parts of the output.)
#
Prof Brian Ripley <ripley <at> stats.ox.ac.uk> writes:

: install/update.packages() in R-devel has been enhanced in a few ways,
: notably to handle multiple repositories, and to allow packages to be 
: reinstalled under the current version of R.

The change to updating that I would like would be to check before 
downloading whether the package is open.  Right now using the 
update menu item in Windows it checks afterwards 
and if its open fails which means that one has to do the download all
over again.  If it failed before downloading it would save some
wasted downloads.
#
Gabor Grothendieck <ggrothendieck <at> myway.com> writes:

: 
: Prof Brian Ripley <ripley <at> stats.ox.ac.uk> writes:
: 
: : install/update.packages() in R-devel has been enhanced in a few ways,
: : notably to handle multiple repositories, and to allow packages to be 
: : reinstalled under the current version of R.
: 
: The change to updating that I would like would be to check before 
: downloading whether the package is open.  Right now using the 
: update menu item in Windows it checks afterwards 
: and if its open fails which means that one has to do the download all
: over again.  If it failed before downloading it would save some
: wasted downloads.

While we are on this topic, when I choose Update from the Windows menu recently
on R 2.0.0 on XP I get the following which I have never seen before.
I am just ignoring these warning messages but am not sure if I should
take notice.

R> update.packages()
trying URL `http://cran.r-project.org/bin/windows/contrib/2.0/PACKAGES'
Content type `text/plain; charset=iso-8859-1' length 22605 bytes
opened URL
downloaded 22Kb

Warning messages: 
1: DESCRIPTION file of package  'file2540'  missing or broken
 in: packageDescription(p, lib = lib, fields = pkgFlds) 
2: number of columns of result
        not a multiple of vector length (arg 2) in: rbind(retval, c(p, lib, 
desc))
#
Prof Brian Ripley wrote:

            
I would prefer b), as I am downloading from the Rgui menu and then moves 
downloaded packages
to a c:\download... area which I use to burn CD-roms I distribute to 
many people. If  a) is choosen I guess
I could learn to use it from the command line, though. What is the 
problem with b)?

Kjetil

  
    
#
On Sun, 7 Nov 2004, Kjetil Brinchmann Halvorsen wrote:

            
Potentially leaving 1Gb or so of files in a temporary directory. So 
probably no big deal.

Brian