Created
December 30, 2015 15:50
-
-
Save dmarcelinobr/8fae2bfbd1c456cc6f06 to your computer and use it in GitHub Desktop.
R script and instructions to install commonly used R packages and instructions for using OpenBLAS on OS X via Homebrew Raw
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
############################################################################## | |
# title : InstallPackages.R; | |
# purpose : install R packages commonly used by Adam H.Sparks when upgrading or installing R; | |
# producer : prepared by A. H. Sparks; | |
# last update : in Los Baños, Laguna, PHL, May 2015; | |
# inputs : none; | |
# outputs : none; | |
# remarks 1 : in order to download any packages, you need to be on-line, of course; | |
# remarks 2 : for country outlines and the like see http://www.gadm.org/ to download Rdata packages; | |
############################################################################## | |
setRepositories() #select amongst repositories that the R installation is aware of OMEGAHAT is necessary for RKML, etc. | |
install.packages("ctv", dep = TRUE) #CRAN Task Views | |
library(ctv) #load ctv library | |
install.views("Spatial") #spatial analysis | |
install.packages("gpclib", dep = TRUE) | |
install.views("Graphics") #Graphic Displays & Dynamic Graphics & Graphic Devices & Visualization | |
install.views("Environmetrics") #analyse ecological and environmental data | |
#packages necessary for work that are not included in the CTV | |
install.packages("doMC", dep = TRUE) #multicore support | |
install.packages("debug", dep = TRUE) #debug package for step through of functions | |
install.packages("RCurl", dep = TRUE) #RCurl for fetching data remotely | |
install.packages("R2HTML", dep = TRUE) | |
install.packages("RKML", dep = TRUE) #high-level facilities to generate KML for display in Googleearth | |
install.packages("RKMLDevice", dep = TRUE) | |
install.packages("RODBC", dep = TRUE) | |
install.packages("dismo", dep = TRUE) | |
install.packages("tableplot", dep = TRUE) | |
install.packages("doBy", dep = TRUE) | |
install.packages("lubridate", dep = TRUE) | |
install.packages("sqldf", dep = TRUE) | |
#cropsim packages | |
install.packages("cropsim") #Enable R-forge repository first | |
#packages for big dataset handling | |
install.packages("data.table", dep = TRUE) | |
install.packages("biglm", dep = TRUE) | |
install.packages("biganalytics", dep = TRUE) | |
install.packages("biglars", dep = TRUE) | |
install.packages("speedglm", dep = TRUE) | |
#use ttf and other fonts in graphs | |
install.packages("extrafont", dep = TRUE) | |
library(extrafont) | |
font_import() | |
loadfonts() | |
#tools for tidying model outputs | |
install.packages("broom", dep = TRUE) | |
#tools for visulazation | |
devtools::install_github("daattali/ggExtra") | |
install.packages("gridExtra") | |
# Tools for network analysis | |
source("http://bioconductor.org/biocLite.R") | |
biocLite("impute") | |
install.packages("WGCNA") | |
# Color palletes | |
install.packages("wesanderson", dep = TRUE) | |
# In order to change which BLAS is used, change the libRblas.dylib symlink | |
# Option 1 for using openBLAS | |
cd /Library/Frameworks/R.framework/Resources/lib | |
sudo rm libRblas.dylib | |
brew tap homebrew/science | |
brew install openblas | |
ln -sf /usr/local/Cellar/openblas/0.2.14_1/lib/libopenblas.dylib /Library/Frameworks/R.framework/Resources/lib/libRblas.dylib | |
#Option 2 - install r with openblas through homebrew | |
brew tap homebrew/dupes | |
brew install tcl-tk --with-tk | |
ln -s /usr/local/Cellar/tcl-tk/8.6.1/lib/libtcl8.6.dylib /usr/local/lib/libtcl8.6.dylib | |
ln -s /usr/local/Cellar/tcl-tk/8.6.1/lib/libtk8.6.dylib /usr/local/lib/libtk8.6.dylib | |
brew tap homebrew/science | |
brew install r --with-openblas | |
#eos |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment