-
Notifications
You must be signed in to change notification settings - Fork 36
mrgsolve Installation
- Prerequisites
- Compilers
- Obtaining
mrgsolve
- Dependencies
- Test the installation
- Upgrading to a new version
-
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 toR
executable; this is usually not an issue onunix
type machines (linux
orMacOSX
) but can cause problems onwindows
. This means, do not installR
inc:\Program Files
; you won't be able to install packages from source or compile your model. For reference see this answer on SO.
- Currently R >=
- Seriously consider running in Rstudio if possible. This is not required but is recommended.
- Compilers:
C++
andgfortran
(see theCompilers
section below)
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.
It is recommended to install mrgsolve
with the devtools
package.
install.packages("devtools")
Use the install_github
function.
devtools::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)
If you are interested in testing a certian feature that is only available on the dev
branch, use
devtools::install_github("metrumresearchgroup/mrgsolve", ref="dev")
Installing mrgsolve
via devtools::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.
An important note: always install Rcpp
and RcppArmadillo
from source
install.packages(c("Rcpp", "RcppArmadillo"), type="source")
For more / specific information on dependencies, see this page.
library(mrgsolve)
?mrgsolve
example("mrgsolve")
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 install again from GitHub.
© 2017 Metrum Research Group, LLC
www.metrumrg.com