On 17 Apr 2015, at 15:23 , Duncan Murdoch <[email protected]> wrote:

> On 17/04/2015 5:54 AM, Roy Mendelssohn - NOAA Federal wrote:
>> Hi All:
>> 
>> Since R 3.2 has been released and the Mac version should be available 
>> shortly, I always forget how the R versioning system and updates relate to 
>> installed packages. Some updates work with what you have installed, some do 
>> not.  I know if the update was to R version 4.x I would likely have to 
>> re-install packages.  Will this require reinstallation, and in general at 
>> what level of update is this the case.
> 
> In version x.y.z, you probably won't need to update if only z changes, but 
> you will if x or y changes, so you should update in this case.
> 
> An easy way to do this is to copy all the packages to the new installation, 
> then run
> 
> update.packages(checkBuilt = TRUE)
> 
> This will reinstall any packages that were built under an earlier version of 
> R. (I believe it ignores z in this choice.) The only disadvantage to doing 
> this is that you will go to the latest version of all packages, and you might 
> have been postponing that due to incompatible changes.
> 

On Mac it seems to be a bit less convenient because the default setup allows 
installs to the system library. E.g.,  I have

$ ls /Library/Frameworks/R.framework/Versions/3.1/Resources/library/
ADGofTest       codetools       graphics        nortest         stats4
Ecdat           colorspace      grid            numDeriv        stringr
Ecfun           compiler        gsl             parallel        survival
ISwR            copula          gss             plyr            tcltk
KernSmooth      datasets        gtable          proto           timeDate
Lahman          dichromat       labeling        pspline         timeSeries
MASS            digest          lattice         quadprog        tools
Matrix          evir            lmom            reshape2        translations
RColorBrewer    fBasics         manipulate      rpart           tseries
Rcpp            fEcofin         methods         rstudio         urca
XML             fGarch          mgcv            scales          utils
base            forecast        mnormt          sn              vcd
boot            foreign         munsell         spatial         zoo
bootstrap       fracdiff        mvtnorm         splines
class           ggplot2         nlme            stabledist
cluster         grDevices       nnet            stats

and once I get around to installing the binaries for 3.2.0, it would be 
problematic to copy all that stuff (NB: including "base", for instance) over 
the default install.

Something like this may be a better idea:

> lib2 <- 
> list.files("/Library/Frameworks/R.framework/Versions/3.0/Resources/library/")
> lib1 <- 
> list.files("/Library/Frameworks/R.framework/Versions/3.1/Resources/library/")
> setdiff(lib2,lib1)
[1] "Hmisc"          "lme4"           "rms"            "SparseM"       
[5] "stockPortfolio" "zipfR"         
> install.packages(setdiff(lib2,lib1))

or, of course, I could have changed the permissions on ..../library to exclude 
group write permission by "admin" in the first place (but frankly, I have 
forgotten whether one does anything related to this during standard 
installation.)


> Duncan Murdoch
> 
> _______________________________________________
> R-SIG-Mac mailing list
> [email protected]
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: [email protected]  Priv: [email protected]

_______________________________________________
R-SIG-Mac mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Reply via email to