1.2. Installing Osmose

The Osmose model is provided as a combination of a Java numerical core (referred to as Osmose-Java), associated with an Osmose R package (referred to as Osmose-R). The code is stored in two GitHub directories, a public one (https://github.com/osmose-model/osmose) and a private one (for developers only, https://github.com/osmose-model/osmose-private). There are several ways to install the Osmose model.

1.2.1. CRAN

The Osmose version on the master branch of the public repository is consistent with the most recent version of the package that is submitted to the CRAN. To install this version, open a R session and type install.packages("osmose")

1.2.2. Manual install

In order to use the development version of the Osmose model, it must be installed manually

1.2.2.1. Install from source files

The first way is to clone or download the source code and to install the code manually. To clone the directory, type in a Terminal:

To clone the Osmose repository:

# using HTTPS:
git clone https://github.com/osmose-model/osmose-private.git

# using SSH
git clone git@github.com:osmose-model/osmose-private.git

When a new version of the code is released, it can be updated as follows:

git pull

Note

When using the SSH, it is necessary to generate a RSA key that will connect the computer and the remote repository (see Github Help for details)

When the code has been downloaded, it must be installed as follows:

R CMD INSTALL osmose

Warning

The code must be reinstalled after each upgrade

1.2.2.2. Using devtools or RStudio

The Osmose package can also be by using the devtools R package or RStudio.

1.2.2.3. devtools

Open a R session and type the following lines:

library("devtools")
install_github("osmose-model/osmose")

1.2.2.4. RStudio

To install Osmose using RStudio, click on the File –> New Project menu and open the Version Control –> Git menu. Set the package URL (https://github.com/osmose-model/osmose-private.git). When the project is opened, click on the Build & Reload button to install the package.