Chapter 4 Installation
You can install the released version of RxODE from CRAN with:
You can install the development version of RxODE with
To build models with RxODE, you need a working c compiler. To use parallel threaded solving in RxODE, this c compiler needs to support open-mp.
You can check to see if R has working c compiler you can check with:
## install.packages("pkgbuild") ::has_build_tools(debug = TRUE)pkgbuild
If you do not have the toolchain, you can set it up as described by the platform information below:
In windows you may simply use installr to install rtools:
install.packages("installr") library(installr) install.rtools()
Alternatively you can download and install rtools directly.
4.0.2 Mac OSX
To get the most speed you need OpenMP enabled and compile RxODE with
that compiler. There are various options and the most up to date
discussion about this is likely the data.table installation faq for
The last thing to keep in mind is that
RxODE uses the code very
similar to the original
lsoda which requires the
to be setup as well as the
If you are going to be using
nlmixr together and have an
older mac computer, I would suggest trying the following:
If this crashes your R session then the binary does not work with your
Mac machine. To be able to run nlmixr, you will need to compile this
package manually. I will proceed assuming you have
installed on your system.
On your system terminal you will need to install the dependencies to
brew install cmake gmp mpfr libmpc
After installing the dependencies, you need to reinstall
install.packages("symengine", type="source") library(symengine)
To install on linux make sure you install
gcc (with openmp support)
gfortran using your distribution’s package manager.
4.1 Development Version
Since the development version of RxODE uses StanHeaders, you will need to make sure your compiler is setup to support C++14, as described in the rstan setup page. For R 4.0, I do not believe this requires modifying the windows toolchain any longer (so it is much easier to setup).
Once the C++ toolchain is setup appropriately, you can install the development version from GitHub with:
# install.packages("devtools") ::install_github("nlmixrdevelopment/RxODE")devtools