Last active
August 14, 2017 01:46
-
-
Save mevers/ac8eccfe45b0638a8b9a258664c91741 to your computer and use it in GitHub Desktop.
Install packages for RMarkdown workshop
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
# Install packages for RMarkdown workshop | |
pkg <- c("ggplot2", "rmarkdown", "knitr", "dplyr", "hrbrthemes", "scatterD3", "pander", "xtable", "DT", "plotly"); | |
lapply(pkg, function(x) { if (!require(x, character.only = TRUE, quietly = TRUE)) { | |
cat(sprintf("Installing R package %s\n", x)); | |
install.packages(x, repos = "http://cran.rstudio.com/"); | |
require(x, character.only = TRUE, quietly = TRUE)} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
perhaps we should add Rcpp? even thought it doesn't make sense on Windows machines as these install pre-compiled binaries