2 Installation

There are two ways to install the R package. As of version 3.0, the R package DramaAnalysis is published in the Comprehensive R Archive Network (CRAN). This makes the installation straightforward, and also takes care of all dependencies. Depending on your installation (R version, operating system etc.), downloading (and sometimes compiling) dependencies might take a while.

install.packages("DramaAnalysis")

The package version in CRAN is updated once in a while, but potentially not every time there is a feature added or bug removed. If you want to install the version we are currently developing, you should install the package “remotes” first. Then, you can install the DramaAnalysis package directly from GitHub. The following code does both, and should also install all dependencies.

install.packages("remotes")

remotes::install_github("quadrama/DramaAnalysis", 
                        dependencies = TRUE)

On GitHub, we distinguish between different branch for development. The most recent stable version is in the master branch, and this will be installed by the above snippet. If you want to use the “bleeding edge” code, you may want to install the develop/3.x branch. This can be done by adding the argument ref=develop/3.x to the install_github call:

remotes::install_github("quadrama/DramaAnalysis", 
                        dependencies = TRUE,
                        ref = "develop/3.x")

To reproduce everything from this tutorial, you will also need the packages magrittr and igraph, but their installation is simple:

install.packages(c("magrittr", "igraph"))

# loads them into your environment
library(magrittr)
library(igraph)