-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.Rmd
70 lines (46 loc) · 2.77 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
# Please put your title here to include it in the file below.
Title <- "
Is prediction of species richness from Stacked Species Distribution Models biased by habitat saturation?"
```
# Is prediction of species richness from Stacked Species Distribution Models biased by habitat saturation?
<!-- badges: start -->
[![DOI](https://zenodo.org/badge/224002794.svg)](https://zenodo.org/badge/latestdoi/224002794) [![Launch Rstudio Binder](http://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/Rekyt/ssdms_saturation_richness/master?urlpath=rstudio)
<!-- badges: end -->
This repository contains the data and code for our paper:
> Grenié, M., Violle, C., & Munoz, F. (2020). Is prediction of species richness from stacked species distribution models biased by habitat saturation?. _Ecological Indicators_, 111, 105970. <https://doi.org/10.1016/j.ecolind.2019.105970>
## How to cite
Please cite this compendium as:
> Grenié M., Violle C, Munoz F., (`r format(Sys.Date(), "%Y")`). _Compendium of R code and data for `r Title`_. Accessed `r format(Sys.Date(), "%d %b %Y")`. Online at <https://doi.org/10.5281/zenodo.3552836>
## 🔧 How to download or install
You can download the compendium as a zip from from this URL: </archive/master.zip>
Or you can install this compendium as an R package, `cssdms.saturation.richness, from GitHub with:
```{r gh-installation, eval = FALSE}
# install.packages("devtools")
remotes::install_github("Rekyt/ssdms_saturation_richness")
```
## 💻 How to run the analyses
This compendium uses [`drake`](https://docs.ropensci.org/drake/) to make analyses reproducible.
To redo the analyses and rebuild the manuscript run the following lines (from the `comsat` folder):
```{r run-analyses, eval = FALSE}
# install.packages("devtools")
pkgload::load_all() # Load all functions included in the package
make(saturation_workflow()) # Run Analyses
```
Beware that some code make time a long time to run, and it may be useful to run analyses in parallel.
## You can run the analyses by clicking on the `Binder` badge: [![Launch Rstudio Binder](http://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/Rekyt/ssdms_saturation_richness/master?urlpath=rstudio)
Dependencies
As noted in the `DESCRPTION` files this project depends on:
* [`virtualspecies`](https://cran.r-project.org/package=virtualspecies), to simulate species;
* [`drake`](https://cran.r-project.org/package=drake), to execute a reproducible workflow;
* the `tidyverse` (`dplyr`, `ggplot2`, `purrr`, and `tidyr`) for data wrangling;
* [`ggpubr`](https://cran.r-project.org/package=ggpubr) to customize plot