#' @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("devtools", "quantmod", "tseries", "dplyr", "CVXR", "ROI", "ROI.plugin.glpk", "ompr", "ompr.roi")
for(package in packages) {
if(!(package %in% rownames(installed.packages()))) { install.packages(package) }
}
# Install Packages from GitHub
library("devtools")
if(!("modopt.matlab" %in% rownames(installed.packages()))) { install_github("rhochreiter/modopt.matlab") }
if(!("scenportopt" %in% rownames(installed.packages()))) { install_github("rhochreiter/scenportopt") }
# Get the latest tutorials.csv
quantR::update()
# Return TRUE whatever happens...
return(TRUE)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.