Installing via the plasmogenepi R-universe

The fastest and simplest way to install DRpower is via the plasmogenepi R-universe as follows:

install.packages('DRpower', repos = c('https://plasmogenepi.r-universe.dev', 'https://cloud.r-project.org'))

However, this may not work for some chips, in which case backup instructions are presented below.

Installing Rcpp

DRpower relies on the Rcpp package, which requires the following OS-specific steps:

  • Windows
    • Download and install the appropriate version of 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
    • Within XCode go to Preferences : Downloads and install the Command Line Tools
  • Linux (Debian/Ubuntu)
    • Install the core software development utilities required for R package development as well as LaTeX by executing

      sudo apt-get install r-base-dev texlive-full

Installing and loading DRpower

Next, in R, ensure that you have the devtools package installed by running

install.packages("devtools", repos = 'http://cran.us.r-project.org')

Then install the DRpower package directly from GitHub by running

devtools::install_github("mrc-ide/DRpower")

If you have any problems installing then please raise an issue on github.

Assuming everything installed correctly, we need to load the package:

library(DRpower)

You can test that the package is loaded and working by running the following command, which should produce this output:

## DRpower version 1.0.2 loaded successfully!