[R-SIG-Mac] Package management in R

David Winsemius dwinsemius at comcast.net
Wed Sep 30 02:04:04 CEST 2015


On Sep 29, 2015, at 3:04 PM, Chris Yang wrote:

> Thanks David. What if I set up my .libPaths so that all packages
> (except those installed by default with R) reside in a single location
> outside of 'Framework' directory? So when I upgrade R to a major
> version (e.g. 3.x to 3.y), the new version will continue to use
> packages at that location, would it be OK?

It should be "OK" if you use update.packages( ... , checkBuilt=TRUE), since there are often updates for packages when the changes in R are more than just bug fixes.

-- 
David.

> 
> I am not worried about losing older versions or their source files, in
> fact, I am concerned with the opposite - having older versions lying
> around unused and I want to clear those up. It's good to know that
> packages for a current major version get overwritten so no older file
> is left dangling.
> 
> 
> On Mon, Sep 28, 2015 at 11:30 PM, David Winsemius
> <dwinsemius at comcast.net> wrote:
>> 
>> On Sep 28, 2015, at 10:38 PM, Chris Yang wrote:
>> 
>>> Hello,
>>> 
>>> I am new to R and just installed R and RStudio on a Mac.
>>> 
>>> I have a question about managing packages in R. I wonder if there is
>>> the need and functionality to periodically clean up packages installed
>>> via RStudio, e.g. older versions, files downloaded for installation,
>>> etc. Does the update remove the older version completely before
>>> installing a new one? And what about installation from source?
>>> 
>>> I ask because Homebrew (a package manager for OS X) keeps older
>>> versions of a package and the files necessary for past installations
>>> upon updates but it offers a command to clean up these stuff too. I
>>> wonder if it is the same for R.
>> 
>> If you have older versions of R in a Framework directory tree, those packages are kept but if you update a package in the current major version it will be over-written. That is not a Mac specific behavior.
>> 
>> You may be able to recover older versions with a Time Machine copy, but I'm not clear why you would want to do so. You can also pull source copies of earlier package version in the CRAN archives.
>> 
>> --
>> David Winsemius
>> Alameda, CA, USA
>> 

David Winsemius
Alameda, CA, USA



More information about the R-SIG-Mac mailing list