---
title: "Setting up R"
output: html_document
---

Run all code in this script to download the desired R packages from either CRAN or GitHub.

The entire process will take several minutes.

Run the code CHUNK BY CHUNK, in the specified order below.

```{r}
# first download and use this package to conveniently install other packages
install.packages('pacman')
library(pacman) 
```

```{r}
# load (install if required) packages from CRAN
p_load("abind",  "dampack", "data.table", "DES", "devtools", "diagram", "dplyr", 
       "ellipse", "flexsurv", "flexsurvcure", "gdata", "ggraph", "gems", "grid", "gridExtra",
       "igraph", "jsonlite", "knitr", "lazyeval", "lhs", 
       "markdown", "matrixStats", "mgcv", "msm", "mstate",
       "plotrix", "purrr", "psych", "reshape2", "rstudioapi",   
       "scales", "scatterplot3d", "stringr", "survHE", "survminer", "shiny",
       "tidyverse", "tidyr", "tm", "triangle", "truncnorm") 

# When you get the question:
#"There is a binary version available but the source version is later: binary source needs_compilation # tm  0.7-8  0.7-9              TRUE"
# Do you want to install from sources the package which needs compilation (Yes/no/cancel)
# Type YES
# Click "Enter" when they ask about what to update
```

```{r}
# load (install if required) packages from GitHub

install_github("DARTH-git/darthtools", force = TRUE) #click "Enter" when they ask about what  to update

p_load("DARTH-git/darthtools")
```


