-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
executable file
·135 lines (103 loc) · 6.85 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
---
title: "traitdata: R package for easy access to various ecological trait data"
output: github_document
editor_options:
chunk_output_type: console
---
## Installation
You can install traitdata from Github with:
```{r gh-installation, eval=F}
# Install devtools if not available
if(!"remotes" %in% installed.packages()[,"Package"]) install.packages("remotes")
# Install traitdata package from Github
remotes::install_github("RS-eco/traitdata", build_vignettes = T, force=T)
```
After installation, simply load the `traitdata` package:
```{r, eval=F}
library(traitdata)
```
**If you encounter a bug or if you have any problems, please file an [issue](https://github.com/RS-eco/traitdata/issues) on Github.**
## Data overview
There are 32 different data sets, which are included in this package:
datasetName | basisOfRecord | rightsHolder | DOI
----------- | ------------- | ------------------ | -----------
amniota | traitDatabase | Myrhvold et al. 2016 | [10.1890/15-0846R.1](http://doi.org/10.1890/15-0846R.1)
amphi_lifehist | traitDatabase | Trochet et al. 2014 | [10.3897/BDJ.2.e4123](http://doi.org/10.3897/BDJ.2.e4123)
amphibio | traitDatabase | Oliveira et al. 2017 | [10.1038/sdata.2017.123](http://doi.org/10.1038/sdata.2017.123)
an_age | traitDatabase | Tacutu et al. 2018 | [10.1093/nar/gkx1042](http://doi.org/10.1093/nar/gkx1042)
anuran_morpho | traitDatabase | Mendoza-Henao et al. 2019 | [10.1002/ecy.2685](http://doi.org/10.1002/ecy.2685)
arthropods | traitDatabase | Gossner et al. 2015 | [10.1038/sdata.2015.13](http://doi.org/10.1038/sdata.2015.13)
atlantic_birds | traitDatabase | Rodrigues et al. 2019 | [10.1002/ecy.2647](https://doi.org/10.1002/ecy.2647)
australian_birds | traitDatabase | Garnett et al. 2015 | [10.1038/sdata.2015.61](https://doi.org/10.1038/sdata.2015.61)
AvianBodySize | traitDatabase | Lislevand et al. 2007 | [10.1890/06-2054](https://doi.org/10.1890/06-2054)
AVONET | traitDatabase | Tobias et al. 2021 |
[10.6084/m9.figshare.16586228.v2](https://doi.org/10.6084/m9.figshare.16586228.v2)
bird_behav | traitDatabase | Tobias & Pigot 2019 | [10.1098/rstb.2019.0012](http://dx.doi.org/10.1098/rstb.2019.0012)
carabids | traitDatabase | van der Plas et al. 2017 | [10.5061/dryad.53ds2](http://doi.org/10.5061/dryad.53ds2)
climber | traitDatabase | Schweiger et al. 2014 | [10.3897/zookeys.367.6185](http://doi.org/10.3897/zookeys.367.6185)
disperse | traitDatabase | Sarremejane et al. 2020 | [10.1038/s41597-020-00732-7](http://doi.org/10.1038/s41597-020-00732-7)
elton_birds | traitDatabase | Wilman et al. 2014 | [10.1890/13-1917.1](http://doi.org/10.1890/13-1917.1)
elton_mammals | traitDatabase | Wilman et al. 2014 | [10.1890/13-1917.1](http://doi.org/10.1890/13-1917.1)
epiphytes | traitDatabase | Hietz et al. 2021 | [10.1111/1365-2745.13802](https://doi.org/10.1111/1365-2745.13802)
eubirds | traitDatabase | Storchová & Hořák 2017 | [10.1111/geb.12709](https://doi.org/10.1111/geb.12709)
fishmorph | traitDatabase | Brosse et al. 2021 | [10.1111/geb.13395](https://doi.org/10.1111/geb.13395)
globalHWI | traitDatabase | Sheard et al. 2020 | [10.1038/s41467-020-16313-6](http://doi.org/10.1038/s41467-020-16313-6)
globTherm | traitDatabase | Bennett et al. 2018 | [10.1038/sdata.2018.22](https://doi.org/10.1038/sdata.2018.22)
heteroptera | traitDatabase | Gossner et al. 2016 | [10.6084/m9.figshare.c.3307611.v1](https://doi.org/10.6084/m9.figshare.c.3307611.v1)
heteropteraRaw | traitDatabase | Gossner et al. 2016 | [10.6084/m9.figshare.c.3307611.v1](https://doi.org/10.6084/m9.figshare.c.3307611.v1)
lizard_traits | traitDatabase | Meiri 2018 | [10.1111/geb.12773](http://doi.org/10.1111/geb.12773)
mammal_diet | traitDatabase | Kissling et al. 2014 | [10.1002/ece3.1136](http://doi.org/10.1002/ece3.1136)
mammal_diet2 | traitDatabase | Gainsbury et al. 2018 | [10.1111/mam.12119](http://doi.org/10.1111/mam.12119)
marsupials | traitDatabase | Fisher et al. 2001 | [10.1890/0012-9658(2001)082[3531:TEBOLH]2.0.CO;2](https://doi.org/10.1890/0012-9658(2001)082[3531:TEBOLH]2.0.CO;2)
migbehav_birds | literatureData | Eyres & Fritz | [10.12761/SGN.2017.10058](http://doi.org/10.12761/SGN.2017.10058)
pantheria | traitDatabase | Jones et al. 2009 | [10.1890/08-1494.1](http://doi.org/10.1890/08-1494.1)
passerines | traitDatabase | Ricklefs 2017 | [10.1002/ecy.1783](http://doi.org/10.1002/ecy.1783)
primates | traitDatabase | Galán-Acedo et al. 2020 | [10.1038/s41597-019-0059-9](http://doi.org/10.1038/s41597-019-0059-9)
reptile_lifehist | traitDatabase | Grimm et al. 2014 | [10.3897/natureconservation.9.8908](http://doi.org/10.3897/natureconservation.9.8908)
tetra_density | traitDatabase | Santini et al. 2018 | [10.1111/geb.12756](https://doi.org/10.1111/geb.12756)
**Note:** The code for how these datatsets were downloaded and processed can be found in the [data-raw](https://github.com/RS-eco/traitdata/tree/main/data-raw) folder.
**See also https://opentraits.org/datasets.html for an extensive list of Trait datasets.**
An overview of the different datasets can also be found here: `vignette("data_info")`.
## Variables
* All published datasets contain their original variables and species names.
Species names were split into 2 columns (Genus and Species) and where applicable into a 3rd column with Subspecies names.
* All datasets also have a scientificNameStd column, which is a standardised scientific name,
in order to be able to merge the different datasets by species.
**Note:** Not all species names could be standardised, therefore some data entries might not contain a scientificNameStd value, please then refer to the Genus and Species column. In case you are interested in which species could not be standardised have a look at the `names_nonStd` file. Please also check out the `synonyms` data file, for species where an alternative name has been used for standardising the scientific name.
An overview of all variables with a description of each variable can be found in the `trait_glossary` data file:
```{r}
data(trait_glossary)
```
or in the `glossary` vignette:
```{r, eval=F}
vignette("trait_glossary")
```
## Data query
To connect to one or more datasets, we simply use the `data()` function.
```{r}
# Load Elton Traits
data("elton_birds")
```
Now we can use standard R calls to have a look at the data.
First, we look at the column names of our dataset.
```{r}
# Look at the variable names
colnames(elton_birds)
```
Then, we check the class and first 6 rows of the first 10 columns of the `elton_traits` dataset:
```{r}
class(elton_birds)
head(elton_birds[,1:10])
```
For more information on how to use the data within the package, check out the `access-data` and all the other vignettes.
```{r, eval=F}
vignette("access-data")
```
Additional examples of how to use the different trait datasets can be found in the following vignettes:
```{r, eval=F}
vignette("island-birds")
vignette("migbehav_birds")
vignette("morpho-indices")
vignette("pantheria")
vignette("passerines")
```