When doing a fresh install of a new version of R, using update.packages()
requires copying some of the contents of the library subdirectory to the new
installation.  While possible and viable, it can be problematic in being
tedious (more an irritation regarding how Windows handles copying
directories from one location to another when there are already things in
the target directory with the same names, than anything else), and there
exists the possibility that there are some old packages that are obsolete
and won't work properly in the new version.

I don't suppose update.packages() will remove obsolete packages in the
library directory if it finds them, does it?

I have a preference for trying to do a fresh install of a given product's
optional packages (so if a given package has a problem in the new version,
it just doesn't install - rather than cluttering its directory tree with
useless stuff); something that is trivially easy if looking at only a
handful of optional packages but very tedious when there are so many.  I
know from experience that repeatedly having a large, complex piece of
software, whether a major application (like R or MS Word, &c.) or an OS like
Windows, update/over-write key part of itself will eventually lead to hard
to diagnose problems.  It is often good to have more than one way to
accomplish a given task, and there are usually many options to choose from
when designing/implementing software.

Actually, with the benefit of 20/20 hindsight, if I had been asked to write
a update.packages() function, I would have had it look in the registery on
Windows, or in the directory tree, for evidence of an older version of R
(perhaps a version that is used only during a fresh install of R), and have
it process the list of detected packages and install/upgrade any packages
that will work with the new version of R, and perhaps, if a given obsolete
package has been superceded by something else, make sure that 'something
else' is installed instead, just so the directory tree for the new install
is not cluttered with old, potentially broken, stuff.

Thanks

Ted

On Thu, Apr 29, 2010 at 4:59 PM, Erik Iverson <er...@ccbr.umn.edu> wrote:

>
>
> Ted Byers wrote:
>
>> 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.
>>
>
> I must be missing the obvious, but what's wrong with update.packages() ?
>



-- 
R.E.(Ted) Byers, Ph.D.,Ed.D.
t...@merchantservicecorp.com
CTO
Merchant Services Corp.
350 Harry Walker Parkway North, Suite 8
Newmarket, Ontario
L3Y 8L3

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to