Created
January 8, 2015 02:00
-
-
Save jrnold/105cb4109c507f8674cb to your computer and use it in GitHub Desktop.
CS&SS/SOC/STAT 221 Install script
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
#' CS&SS/SOC/STAT 221 Install Script | |
#' | |
#' Install R Commander and necessary packages and data to be | |
#' used in CS&SS/SOC/STAT 221. | |
#' | |
is_installed <- function(pkg) { | |
is.element(pkg, installed.packages()[,1]) | |
} | |
# Set a CRAN mirror so none is requested (even if not using RStudio) | |
options(repos = list("CRAN" = "http://cran.rstudio.com")) | |
# install R Commander | |
if (! is_installed("Rcmdr")) { | |
install.packages(c("Rcmdr"), dependencies = TRUE) | |
} | |
# Installl packages for course from github | |
if (! is_installed("devtools")) { | |
install.packages("devtools", dependencies = TRUE) | |
} | |
install_github(c("jrnold/bps6data", "jrnold/bps5data")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment