The installation is in two steps:
First carry out the instructions below for your OS
Then install the package in R.
1) Install compilers for your OS
Windows:
It’s best to install the latest version of R
(
download).
Next you must install a set of compilers required for ctsmr to work:
Download the version for your R
version (
Rtools)
and install it. Please follow the instructions and remember the step to
put Rtools on the PATH.
For 3.x versions, you mostly you do not
have to change any settings during the installation of Rtools (however
in few rare cases it has been necessary to “add rtools to system PATH”
see this
here).
macOS (OS X 10.11 or
higher):
Compilers must be installed after installing R, so:
- For R 4.0 and newer:
Follow the instructions
here:
install compilers.
Note, that those instructions are slightly outdated, find the gfortran
compiler for your OS
here.
Linux:
Use any newer version of R and make sure to install gcc and gfortran
through the package manager of your OS.
2) Install the ctsmr R package
Open R using e.g. Rstudio. In the Console run:
# Create a folder .R in the user folder
install.packages("ctsmr", repos = c(ctsmr = "http://ctsm.info/repo/dev", getOption("repos")))
In case you get the warning: “Package is only available in source
form…”) then answer “Yes” to the question about installing from source.
To avoid this warning and always install from source use:
install.packages("ctsmr", repos = c(ctsmr = "http://ctsm.info/repo/dev", getOption("repos")), type="source")
ctsmr is now ready for continous time stochastic modelling.