Install packages we’ll use

Copy and paste this long code chunk into the R Console window and press [Enter]. Each package will be downloaded (along with package dependencies) and installed.

# Prof. Erik Erhardt
# R Install All

# Fall 2019

## Pre-req: R and RStudio
## Download pages:
##    Windows: https://cran.r-project.org/bin/windows/base/
##    Mac:     https://cran.r-project.org/bin/macosx/
##    Win/Mac: https://www.rstudio.com/products/rstudio/download/#download

## After R and RStudio are installed, then:
##  start RStudio and copy/paste the code below into the console and press [Enter].
# If it asks to "install from sources the package which needs compilation", say No.

# This script will install the required packages for R.

# set a package repository
local({
  r <- getOption("repos")
  r["CRAN"] <- "https://cran.revolutionanalytics.com/"
  options(repos = r)
})

# Install all CRAN packages
package_list <-
  c(
    "BSDA"
  , "DT"
  , "GGally"
  , "Hmisc"
  , "ISLR"
  , "MASS"
  , "NbClust"
  , "PASWR2"
  , "R.oo"
  , "TeachingDemos"
  , "VIM"
  , "WDI"
  , "annimation"
  , "aod"
  , "beeswarm"
  , "candisc"
  , "car"
  , "cluster"
  , "corrgram"
  , "deducorrect"
  , "descr"
  , "devtools"
  , "dplyr"
  , "dprep"
  , "editrules"
  , "ellipse"
  , "foreign"
  , "ggmap"
  , "ggplot2"
  , "ggthemes"
  , "ggvis"
  , "gridExtra"
  , "gvlma"
  , "heplots"
  , "klaR"
  , "knitr"
  , "lattice"
  , "leaps"
  , "lmPerm"
  , "lsmeans"
  , "lubridate"
  , "mapproj"
  , "maps"
  , "moments"
  , "moonBook"
  , "multcomp"
  , "mvnormtest"
  , "nortest"
  , "plyr"
  , "popbio"
  , "pwr"
  , "quantmod"
  , "readr"
  , "reshape2"
  , "rgl"
  , "rspa"
  , "rworldmap"
  , "scales"
  , "scatterplot3d"
  , "sna"
  , "stargazer"
  , "stringdist"
  , "stringr"
  , "tidyr"
  , "treemap"
  , "vcd"
  , "vcdExtra"
  , "vioplot"
  , "xtable"
  , "xts"
  , "lme4"
  , "mice"
  , "tidyverse"
  , "cowplot"
  )

install.packages(package_list, dependencies = TRUE, type = "binary")