# Prof. Erik Erhardt
# R Install All
# Fall 2021 / Spring 2022
## Pre-req: R and RStudio
## R 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
## RStudio Desktop Download page:
## https://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({
<- getOption("repos")
r "CRAN"] <- "https://cran.revolutionanalytics.com/"
r[options(repos = r)
})
# Install all CRAN packages
<-
package_list c(
"aod"
"BSDA"
, "candisc"
, "car"
, "caret"
, "class"
, "cluster"
, "coin"
, "deducorrect"
, "descr"
, "digest"
, "dplyr"
, "e1071"
, "editrules"
, "ellipse"
, "emmeans"
, "factoextra"
, "FactoMineR"
, "forcats"
, "GA"
, "gdata"
, "GGally"
, "ggplot2"
, "gridExtra"
, "gsheet"
, "gvlma"
, "heplots"
, "Hmisc"
, "inline"
, "klaR"
, "knitr"
, "LaplacesDemon"
, "lattice"
, "leaps"
, "lmPerm"
, "lubridate"
, "MASS"
, "mixtools"
, "mlbench"
, "moments"
, "moonBook"
, "multcomp"
, "multcompView"
, "mvnormtest"
, "NbClust"
, "nortest"
, "npsm"
, "popbio"
, "pwr"
, "quarto"
, "R.oo"
, "randomForestSRC"
, "rgl"
, "ROCR"
, "rpart"
, "rspa"
, "scales"
, "scatterplot3d"
, "scholar"
, "stargazer"
, "stringdist"
, "stringr"
, "TeachingDemos"
, "tidyr"
, "tidyverse"
, "tm"
, "tseries"
, "vcd"
, "vegan"
, "VIM"
, "vioplot"
, "WDI"
, "wordcloud"
, "xtable"
,
)
install.packages(package_list, dependencies = TRUE, type = "binary")
install.packages("devtools", dependencies = TRUE, type = "binary")
::install_github("erikerhardt/erikmisc")
devtools
# For erikmisc...
# If it asks to update packages (it should not ask this if you updated packages above), press 3 [Enter] for “None”.
# If asks about “make” command, click “Cancel”.
# If asks about “git” command, click “Cancel”.
ADA1 and ADA2, Installing R Packages
Advanced Data Analysis 1 and 2, Stat 427/527 and Stat 428/528, Prof. Erik Erhardt, UNM
Install packages we’ll use
- This will take a while, so do only once.
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.