Created
April 5, 2012 22:27
-
-
Save ramnathv/2314680 to your computer and use it in GitHub Desktop.
Upgrade R on Mac OS 10.5.8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GET LIST OF INSTALLED PACKAGES | |
pkgs <- installed.packages(priority='NA')[,'Package'] | |
save(pkgs, file="installed_pkgs.rda") | |
# Install the most recent version of R: | |
# Download the most recent version of R from The Comprehensive R Archive Network (CRAN) | |
# To wipe the old R version | |
rm -rf /Library/Frameworks/R.framework /Applications/R.app | |
rm -rf /Library/Receipts/R-* | |
# Build from source new R version (see this FAQ). | |
# From inside the decompressed R-?.?.? directory type: | |
# See Section 2.2 of RMacOSX FAQ for the flag description | |
./configure --with-blas='-framework vecLib' --enable-BLAS-shlib | |
make | |
sudo make install | |
# Install BioConductor packages using the biocLite.R installation script. | |
# In an R command window, type the following: | |
source("http://bioconductor.org/biocLite.R") | |
chooseBioCmirror() | |
biocLite() | |
# If you have other Bioconductor packages missing from the old installation: | |
load("installed_old.rda") | |
tmp <- installed.packages() | |
installedpkgs.new <- as.vector(tmp[is.na(tmp[,"Priority"]), 1]) | |
missing <- setdiff(installedpkgs, installedpkgs.new) | |
for (i in 1:length(missing)) biocLite(missing[i]) | |
Re-install the missing packages from CRAN: | |
load("installed_old.rda") | |
tmp <- installed.packages() | |
installedpkgs.new <- as.vector(tmp[is.na(tmp[,"Priority"]), 1]) | |
missing <- setdiff(installedpkgs, installedpkgs.new) | |
install.packages(missing) | |
update.packages() | |
# If you use some package created by Henrik Bengtsson: | |
# source("http://www.braju.com/R/hbLite.R") | |
hbLite() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment