Skip to content

mrgsolve Installation

Kyle Baron edited this page Feb 27, 2017 · 41 revisions

Prerequisites

  • R: https://cran.r-project.org/
    • Currently R >= 3.1.2 is required
    • IMPORTANT Install R in a location such that no spaces are in the path to R executable; this is usually not an issue on unix type machines (linux or MacOSX) but can cause problems on windows. This means, do not install R in c:\Program Files; you won't be able to install packages from source or compile your model. For reference see this answer on SO.
  • Seriously consider running in Rstudio if possible. This is not required but is recommended.
  • Compilers: C++ and gfortran (see the Compilers section below)

Compilers

There is a separate wiki page for information on compilers required to use mrgsolve. Please visit that page and make sure the compiler is properly installed before proceeding to the next steps.

Obtaining mrgsolve

It is recommended to install mrgsolve with the remotes package.

install.packages("remotes")

Use the install_github function.

remotes::install_github("metrumresearchgroup/mrgsolve", type="source")

See the releases page to download a specific release. Be sure to download the tarball (e.g. mrgsolve_x.y.z.tar.gz). To install from the tarball use:

install.packages("mrgsolve_x.y.z.tar.gz", repos=NULL)

Dependencies

Installing mrgsolve via remotes::install_github will also install required dependencies. It is best practice to use the most recent version of mrgsolve and recent versions of all depencencies.

For more / specific information on dependencies, see this page.

Test the installation

library(mrgsolve)
?mrgsolve
example("mrgsolve")

Upgrading to a new version

Users are encouraged to re-install or re-compile Rcpp and RcppArmadillo prior to upgrading to a new version of mrgsolve. To upgrade mrgsolve, simply follow the install step above.


© 2017 Metrum Research Group, LLC
www.metrumrg.com
Clone this wiki locally