I tend to have a lot of packages installed, in part because of a wide
diversity of interests and a disposition of examining different ways to
accomplish a given task.

I am looking for a better way to upgrade all my packages when I upgrade the
version of R that I am running.

On looking at support for installing and updating packages, I found these
two: installed.packages() and  install.packages() and it occurred to me that
in principle I ought to be able to use the one in the original installation
to get a list of packages I'm working with and and put its output into a
plain text file that I can read in the new installation and pass to the
other to ensure the new installation has a fresh installation of all the
packages I want to work with.

The question comes WRT the fact the output from installed.packages() does
not coincide with the expected input for install.packages().  What would you
recommend I do to select from the output from the former so the file I write
that output to will have the information the latter wants for input?  For
example, will it work properly if I just write the package names
installed.packages() returns to the file and ignore all the rest?  It is not
clear to me how I'd have it ignore those packages that are part of the core
of R (or even if I need to worry about that - I did see some packages listed
in the output from installed.packages() that are identified as being part of
R 2.10.1, when I looked at using this procedure to set up R 2.11.0).

NB: I am not suggesting the output from the one should coincide with the
expected input for the other.  Rather, I am asking advice on writing simple
R scripts that I can run in the one to get a file that would be suitable
input for the other that would together make a fresh installation of a new
version automatically make a fresh installation of all the previously
installed packages.

Thanks

Ted

PS: I am using Windows XP, if that matters.

	[[alternative HTML version deleted]]

