---
title: "Installation"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{Installation}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

```{r, include = FALSE, messsage = FALSE, warning = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

options(rmarkdown.html_vignette.check_title = FALSE)  

```

### Installation

You can install the released version of evalITR from [CRAN](https://CRAN.R-project.org) with:

```{r messsage = FALSE, warning = FALSE, eval=FALSE}
# Install release version from CRAN (updating evalITR is the same command)
install.packages("evalITR")
```

Or, you can install the development version of evalITR from [GitHub](https://github.com/) with:

``` {r messsage = FALSE, warning = FALSE, eval = FALSE}
# install.packages("devtools")
devtools::install_github("MichaelLLi/evalITR", ref = "causal-ml")
```

If you want to use the latest version of the package, you can install the development version of evalITR by specifying the branch name  in `devtools::install_github`.


### Parallelization

(Optional) if you have multiple cores, we recommendate using multisession futures and processing in parallel. This would increase computation efficiency and reduce the time to fit the model. 

```{r messsage = FALSE, warning = FALSE, eval=FALSE}
library(furrr)
library(future.apply)

# check the number of cores
parallel::detectCores()

# set the number of cores
nworkers <- 4
plan(multisession, workers =nworkers)
```

