--- title: "Installing drjacoby" author: "Bob Verity and Pete Winskill" date: "`r Sys.Date()`" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{Installing drjacoby} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- ```{r setup, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) ``` ## Installing Rcpp *drjacoby* relies on the [Rcpp](https://cran.r-project.org/web/packages/Rcpp/index.html) package, which requires the following OS-specific steps: * Windows - Download and install the appropriate version of [Rtools](https://cran.rstudio.com/bin/windows/Rtools/) for your version of R. On installation, ensure you check the box to arrange your system PATH as recommended by Rtools * Mac OS X - Download and install [XCode](http://itunes.apple.com/us/app/xcode/id497799835?mt=12) - Within XCode go to Preferences : Downloads and install the Command Line Tools * Linux (Debian/Ubuntu) - Install g++ with ```{} sudo apt-get update sudo apt-get install g++ ``` Irrespective of which system you use above, you should then install and load Rcpp with ```{r, eval = FALSE} install.packages("Rcpp") library(Rcpp) ``` You can check the version number to make sure it has properly installed ```{r, eval = FALSE} packageVersion("Rcpp") ``` ## Installing and loading *drjacoby* Next, in R, ensure that you have the [devtools](https://www.rstudio.com/products/rpackages/devtools/) package installed by running ```{r, eval = FALSE} install.packages("devtools", repos='http://cran.us.r-project.org') ``` Then install the *drjacoby* package directly from GitHub by running ```{r, eval = FALSE} devtools::install_github("mrc-ide/drjacoby") ``` If you have any problems installing then please [raise an issue](https://github.com/mrc-ide/drjacoby/issues) on github. Assuming everything installed correctly, we need to load the package: ```{r} library(drjacoby) ``` You can test that the package is loaded and working by running the following command, which should produce this output: ```{r} check_drjacoby_loaded() ```