Skip to content
Snippets Groups Projects
Commit 3880e21c authored by Nauta, Lisanne's avatar Nauta, Lisanne
Browse files

Added instructions to install the project dependencies using renv in the README file.

parent 4bb02052
Branches mapping-tool
No related tags found
No related merge requests found
......@@ -16,23 +16,6 @@ git clone https://git.wur.nl/glowpa/glowpa-model.git
git checkout mapping-tool
```
dependencies for model:
```R
install.packages("raster","sf","sp","logger","dplyr","tictoc","parallel","khroma")
```
Note that the raster package is deprecated since October 2023, but can be installed in R 4.3.3 on Windows systems.
dependencies for pathogenflows:
```R
install.packages("jsonlite")
```
additional dependencies for api:
```R
install.packages("jsonlite","plumber","rnaturalearth","rnaturalearthdata")
```
The mapping tool branch comes with the following submodules:
* pathogenflows R package (https://git.wur.nl/glowpa/pathogenflows.git forked from https://github.com/mverbyla/pathogenflows)
......@@ -44,7 +27,27 @@ git submodule update
```
The git repository of the submodule is now cloned in the submodule directory. Now open the GloWPa.Rproj file R studio.
Install the Pathogenflows library from the source code: `install.packages('./libs/pathogenflows', repos = NULL, type = 'source')`
We use `renv` to install the project dependencies. The required packages to run the model will be downloaded and installed from CRAN. The only exception is the pathogenflows package which will be installed from the ./libs/pathogenflows path. Make sure you have followed the previous instructions regarding the git submodules. The renv lockfile does not contain dependencies to run the plumber API.
```R
renv::restore()
```
Note that the raster package is deprecated since October 2023, but can be installed in R 4.3.3 on Windows systems.
In case you want to install the required packages without using renv. First install the following required packages from CRAN:
```R
install.packages("raster","sf","sp","logger","dplyr","tictoc","parallel","khroma","jsonlite")
```
Finally, install the pathogenflows package from the source code in the `libs/pathogenflows` directory:
```R
install.packages("./libs/pathogenflows", repos = NULL, type = "source")
```
Additional dependencies to run the Plumber API:
```R
install.packages("jsonlite","plumber","rnaturalearth","rnaturalearthdata")
```
## Updating code in submodules
In case anything needs to be changed in the submodule code make sure you make changes in the repository of the submodule. So:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment