Decision Optimization with R

Introduction to the R package of this repository

Decision Optimization with R

This repository is about learning Decision Optimization with R online! In addition to the tutorials as well as videos there is a R Package optimizationR available at http://www.github.com/smartbeta/learnR/ which contains all codes that are discussed within the tutorials. Thus the package can be used to conveniently inspect and modify the respective tutorial content locally.

Decision Optimization with R package

Install the package

To install the package optimizationR please issue the following commands on the R console:

# install package `devtools` if not done yet
if(!("devtools" %in% rownames(installed.packages()))) { install.packages("devtools") }

# install package `optimizationR`
devtools::install_github("smartbeta/learnR/optimizationR")

# always load the package before using it
library(optimizationR)

# install futher required packages from GitHub and R-Forge, etc.
optimizationR::setup()

Use the package

The main function of optimizationR is tutorial(id) which opens the code of the respective tutorial with the identification code id, i.e.

# always load the package before using it
library(optimizationR)

# always explicitly use all functions of the package using the optimizationR:: notation
file.edit(optimizationR::tutorial(1)) # open tutorial #1

You can find the specific tutorial number at the top of each tutorial. Click here to browse through the list of tutorials.

Update tutorial information

If you have problems loading a tutorial it might be that your tutorial information is out of date. In this case just issue the update() function to receive the latest version without having to upgrade the package.

# always load the package before using it
library(optimizationR)

# always explicitly use all functions of the package using the optimizationR:: notation
optimizationR::update()