Last active
May 18, 2016 18:18
-
-
Save dholstius/2f7b93e3bb0d3a1f10a03e0309176411 to your computer and use it in GitHub Desktop.
R 3.3 library
This file contains hidden or 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
# $ brew install libssh2 | |
# $ brew install libgit2 | |
## $ export CMAKE_INCLUDE_PATH="/usr/local/Cellar/libssh2/1.7.0/include" | |
## $ export CMAKE_LIBRARY_PATH="/usr/local/Cellar/libssh2/1.7.0/lib" | |
# NOTE: re: git2r: https://github.com/ropensci/git2r/issues/236 | |
install_CRAN <- function (pkg, repos = "http://cran.rstudio.com", verbose = TRUE, ...) { | |
if (pkg %in% installed.packages()) message(pkg, " is already installed") | |
else install.packages(pkg, repos = repos, verbose = verbose, ...) | |
} | |
install_CRAN("devtools") | |
install_github <- function (pkg, verbose = TRUE, ...) { | |
if (pkg %in% installed.packages()) message(pkg, " is already installed") | |
else devtools::install_github(pkg) | |
} | |
install_CRAN("purrr") | |
install_local <- function (pkg, path = "/Users/dholstius/Dropbox/R-packages", verbose = TRUE, ...) { | |
if (pkg %in% installed.packages()) message(pkg, " is already installed") | |
else install.packages(file.path(path, pkg), repos = NULL, type = "source", verbose = verbose, ...) | |
} | |
library(purrr) | |
c("tidyr", "readr", "readxl") %>% map(safely(install_CRAN)) | |
c("flogger", "cacher", "tbltools", "geotools", "Ingres", "inventory") %>% map(safely(install_local)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment