R/setup.R

#' @title Install required non-CRAN packages from GitHub and elsewhere for the tutorials
#'
#' @description
#' \code{setup} installs all required non-CRAN packages from GitHub and elsewhere
#'
#' @author Ronald Hochreiter, \email{ronald@@algorithmic.finance}
#'
#' @export
setup <- function() {
  
  # Install Packages from CRAN
  packages <- c("quantmod", "tseries")

  for(package in packages) {
    if(!(package %in% rownames(installed.packages()))) { install.packages(package) }
  }
  
  # Now run update()
  financeR::update()
  
  # Return TRUE whatever happens...
  return(TRUE)
}
smartbeta/finance-r documentation built on May 4, 2019, 7:43 p.m.