R/packageSet.R

Defines functions packageSet

Documented in packageSet

# Hello, world!
#
# This is an example function named 'hello'
# which prints 'Hello, world!'.
#
# You can learn more about package authoring with RStudio at:
#
#   http://r-pkgs.had.co.nz/
#
# Some useful keyboard shortcuts for package authoring:
#
#   Build and Reload Package:  'Cmd + Shift + B'
#   Check Package:             'Cmd + Shift + E'
#   Test Package:              'Cmd + Shift + T'


all <- c('Rcpp', 'GGally', 'scales', 'lattice', 'MASS', 'plyr',
         'gridExtra', 'reshape2', 'RColorBrewer', 'tidyverse',
         'nycflights13', 'gapminder', 'Lahman', 'devtools',
         'miniUI', 'ggthemes', 'ggridges', 'ggmap', 'rworldmap',
         'microbenchmark', 'feather', 'ggfortify', 'lfda', 'cluster',
         'stats', 'stringr', 'keras', 'ramify', 'progress', 'abind')


deep_learning <- c('tidyverse', 'reshape2', 'devtools', 'stats', 'keras', 'ramify', 'progress', 'abind')


packageSet <- function(pkg = c(all, deep_learning)){
  new.pkg <- pkg[!(pkg %in% installed.packages()[, 'Package'])]
  if (length(new.pkg))
    install.packages(new.pkg, dependencies = TRUE, repos = 'http://cran.us.r-project.org')
  sapply(pkg, require, character.only = TRUE)
  # install_github("sndean/RmdTo")
  # library(RmdTo)
}
sndean/packageSets documentation built on May 17, 2019, 8:45 p.m.