Skip to content

Instantly share code, notes, and snippets.

@jrnold
Created January 8, 2015 02:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jrnold/105cb4109c507f8674cb to your computer and use it in GitHub Desktop.
Save jrnold/105cb4109c507f8674cb to your computer and use it in GitHub Desktop.
CS&SS/SOC/STAT 221 Install script
#' 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