[R-SIG-Mac] R Versioning and Packages
Simon Urbanek
simon.urbanek at r-project.org
Fri Apr 17 20:39:07 CEST 2015
> On Apr 17, 2015, at 10:19 AM, peter dalgaard <pdalgd at gmail.com> wrote:
>
>
> On 17 Apr 2015, at 15:23 , Duncan Murdoch <murdoch.duncan at gmail.com> 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.)
>
Or for Mac users that don't want to do things by hand there is a GUI for that - just use "Select packages from R 3.1" in the Package Installer.
The separation of packages by version is intentional since they rarely work across major versions - we had too many headaches and silent segfaults.
Cheers,
Simon
FWIW: The Mac 3.2.0 binary release is slightly delayed precisely because we're trying to have a more complete set of binary packages than previously so they are all getting build against the release. For those impatient you can always get the R binaries from the Mac devel page.
> Duncan Murdoch
>>
>> _______________________________________________
>> R-SIG-Mac mailing list
>> R-SIG-Mac at r-project.org
>> 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: pd.mes at cbs.dk Priv: PDalgd at gmail.com
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>
More information about the R-SIG-Mac
mailing list