├── .Rbuildignore ├── .gitignore ├── DESCRIPTION ├── LICENSE.md ├── NAMESPACE ├── R ├── get_taxonomy.R ├── standardize_taxonomy.R └── traitdata-package.R ├── README.Rmd ├── README.md ├── data-raw ├── download-data.R └── standardise-names.R ├── data ├── AvianBodySize.rda ├── amniota.rda ├── amphi_lifehist.rda ├── amphibio.rda ├── an_age.rda ├── anuran_morpho.rda ├── arthropods.rda ├── atlantic_birds.rda ├── australian_birds.rda ├── avonet.rda ├── bird_behav.rda ├── carabids.rda ├── climber.rda ├── disperse.rda ├── elton_birds.rda ├── elton_mammals.rda ├── epiphytes.rda ├── eubirds.rda ├── fishmorph.rda ├── globTherm.rda ├── globalHWI.rda ├── heteroptera.rda ├── heteropteraRaw.rda ├── lizard_traits.rda ├── mammal_diet.rda ├── mammal_diet2.rda ├── marsupials.rda ├── migbehav_birds.rda ├── names_nonStd.rda ├── pantheria.rda ├── passerines.rda ├── primates.rda ├── reptile_lifehist.rda ├── synonyms.rda ├── taxonomyStd.rda ├── tetra_density.rda └── trait_glossary.rda ├── man ├── AvianBodySize.Rd ├── amniota.Rd ├── amphi_lifehist.Rd ├── amphibio.Rd ├── an_age.Rd ├── anuran_morpho.Rd ├── arthropods.Rd ├── atlantic_birds.Rd ├── australian_birds.Rd ├── avonet.Rd ├── bird_behav.Rd ├── carabids.Rd ├── climber.Rd ├── disperse.Rd ├── elton_birds.Rd ├── elton_mammals.Rd ├── epiphytes.Rd ├── eubirds.Rd ├── fishmorph.Rd ├── get_taxonomy.Rd ├── globTherm.Rd ├── globalHWI.Rd ├── heteroptera.Rd ├── heteropteraRaw.Rd ├── lizard_traits.Rd ├── mammal_diet.Rd ├── mammal_diet2.Rd ├── marsupials.Rd ├── migbehav_birds.Rd ├── names_nonStd.Rd ├── pantheria.Rd ├── passerines.Rd ├── primates.Rd ├── reptile_lifehist.Rd ├── standardize_taxonomy.Rd ├── synonyms.Rd ├── taxonomyStd.Rd ├── tetra_density.Rd ├── trait_glossary.Rd └── traitdata.Rd ├── traitdata.Rproj └── vignettes ├── access-data.R ├── access-data.Rmd ├── access-data.html ├── data_info.R ├── data_info.Rmd ├── data_info.html ├── island-birds.R ├── island-birds.Rmd ├── island-birds.html ├── migbehav_birds.Rmd ├── migbehav_birds.html ├── morpho-indices.R ├── morpho-indices.Rmd ├── morpho-indices.html ├── pantheria.R ├── pantheria.Rmd ├── pantheria.html ├── passerines.R ├── passerines.Rmd ├── passerines.html ├── trait_glossary.R ├── trait_glossary.Rmd └── trait_glossary.html /.Rbuildignore: -------------------------------------------------------------------------------- 1 | ^.*\.Rproj$ 2 | ^\.Rproj\.user$ 3 | README.Rmd 4 | ^data-raw$ 5 | ^LICENSE\.md$ 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .Rproj.user 2 | .Rhistory 3 | .RData 4 | .Ruserdata 5 | -------------------------------------------------------------------------------- /DESCRIPTION: -------------------------------------------------------------------------------- 1 | Package: traitdata 2 | Type: Package 3 | Title: Easy access to various ecological trait data 4 | Version: 0.0.1 5 | Date: 2022-01-20 6 | Authors@R: 7 | person("RS-eco", email = "RS-eco@posteo.de", role = c("cre", "aut")) 8 | Author: RS-eco [aut, cre] 9 | Maintainer: RS-eco 10 | Description: An easy way to access 32 different trait datasets 11 | covering amphibian, bird, insect, mammal, reptile, spider, fish and plant species. 12 | Depends: R (>= 4.0) 13 | Suggests: knitr, rmarkdown, ggplot2, dplyr, taxize, raster, tidyr, readr, readxl, patchwork 14 | Imports: utils 15 | License: GPL (>= 3) 16 | Encoding: UTF-8 17 | LazyData: TRUE 18 | LazyDataCompression: xz 19 | VignetteBuilder: knitr 20 | RoxygenNote: 7.1.2 21 | NeedsCompilation: no 22 | URL: https://github.com/RS-eco/traitdata 23 | BugReports: https://github.com/RS-eco/traitdata/issues 24 | -------------------------------------------------------------------------------- /NAMESPACE: -------------------------------------------------------------------------------- 1 | # Generated by roxygen2: do not edit by hand 2 | 3 | export(get_taxonomy) 4 | export(standardize_taxonomy) 5 | -------------------------------------------------------------------------------- /R/get_taxonomy.R: -------------------------------------------------------------------------------- 1 | #' Get accepted canonical names and taxonomy for a given species name 2 | #' 3 | #' @usage get_taxonomy(x, preferred_data_sources=c(11:15), fuzzy = TRUE, verbose = TRUE) 4 | #' @param x a character string or vector of species names. 5 | #' @param preferred_data_sources Select the datasources that should be used for name matching, default is GBIF. 6 | #' @param fuzzy logical. If TRUE, function tries fuzzy matching for species requests. 7 | #' May produce output, if normal matching fails. (not working!) 8 | #' @param verbose logical. If FALSE, warnings and messages are suppressed. 9 | #' @return a \code{data.frame} mapping the user supplied names to the accepted taxon names and 10 | #' higher taxonomic information (kingdom, phylum, class, order, family, genus). 11 | #' 12 | #' @details If 'synonym' is returned as TRUE, the user provided name has been identified as a synonym and was mapped to an accepted name. 13 | #' The field confidence reports the confidence of the matching procedure performed by the function 'get_gbifid_()' of the package 'taxize'. 14 | #' The taxonID is a globally valid URI that links to the taxon description of the GBIF backbone taxonomy. 15 | #' @author RS-eco 16 | #' @references The initial code of this function was obtained from the `traitdataform` package, 17 | #' which is available on GitHub: \url{https://github.com/EcologicalTraitData/traitdataform}. 18 | #' @examples 19 | #' \dontrun{ 20 | #' get_taxonomy(x="Chorthippus albomarginatus") 21 | #' 22 | #' get_taxonomy(x=c("Equus burchellii", "Equus quagga")) 23 | #' 24 | #' get_taxonomy(x="Aegotheles tatei") 25 | #' } 26 | #' @export 27 | get_taxonomy <- function(x, preferred_data_sources=c(11:15), 28 | fuzzy = TRUE, verbose = TRUE) { 29 | # Install taxize package if not available 30 | if (!requireNamespace("taxize", quietly = TRUE)) { 31 | utils::install.packages("taxize") 32 | } 33 | 34 | if(length(x) > 1) { # recursive wrapping for vectorized input 35 | out <- lapply(x, FUN=function(x){ 36 | out <- tryCatch(get_taxonomy(as.character(x)), error=function(e) e) 37 | if(inherits(out, "error")){ 38 | out <- data.frame(scientificName=x) 39 | } 40 | return(out) 41 | }) 42 | if (!requireNamespace("dplyr", quietly = TRUE)) { 43 | utils::install.packages("dplyr") 44 | } 45 | out <- dplyr::bind_rows(out) # combine into data.frame 46 | } else { 47 | if(nchar(gsub(" ","",x)) <= 1 || is.null(x)) x <- NULL 48 | # spellchecking: resolve names using data source 11 (GBIF Backbone Taxonomy) 49 | resolved <- taxize::gnr_resolve(x, 50 | preferred_data_sources = preferred_data_sources, 51 | best_match_only = TRUE, 52 | canonical = TRUE) 53 | # return NA for unsuccessful matches 54 | if(is.null(resolved$matched_name2) || nchar(gsub(" ","",resolved$matched_name2)) == 0 ) { 55 | strsplit(x, split=" ") 56 | out <- data.frame(user_supplied_name = x) 57 | attributes(out)$warning <- paste("No matching species name found!") 58 | out$warnings <- paste(out$warnings, attributes(out)$warning, sep = "; ") 59 | } else { 60 | # get gbif ID and detailled information, e.g. synonym status 61 | temp <- taxize::get_gbifid_(resolved$matched_name2)[[1]] 62 | 63 | # switch for allowing for fuzzy matching 64 | if(any(temp$matchtype == "EXACT") || !fuzzy) temp <- temp[temp$matchtype == "EXACT",] 65 | 66 | # if given name is a synonym, do a new request for the accepted species name 67 | if(all(temp$status == "SYNONYM")) { 68 | out <- tryCatch(get_taxonomy(temp$species[which.max(temp$confidence)]), 69 | error=function(e) e) 70 | if(inherits(out, "error")){ 71 | out <- data.frame(scientificName=x) 72 | } 73 | out$synonym = TRUE 74 | out$user_supplied_name = x 75 | attributes(out)$warning <- paste("Synonym provided! Automatically set to accepted species Name!") 76 | out$warnings <- paste(out$warnings, attributes(out)$warning, sep = "; ") 77 | } else { # if given name is an accepted name, return result into 'out' 78 | if(any(temp$status %in% c("ACCEPTED", "DOUBTFUL") )) { 79 | temp <- temp[temp$status %in% c("ACCEPTED", "DOUBTFUL"),] 80 | out <- temp[which.max(temp$confidence),] 81 | 82 | # Install dplyr package if not available 83 | if (!requireNamespace("dplyr", quietly = TRUE)) { 84 | utils::install.packages("dplyr") 85 | } 86 | 87 | # add choice for fuzzy matching which returns warning 88 | if(is.null(out$species)){out$species <- out$genus} 89 | out <- cbind(scientificName = x, 90 | synonym = FALSE, 91 | scientificNameStd = out$species, 92 | author = sub(paste0(out$species," "), "", out$scientificname), 93 | taxonRank = out$rank, 94 | dplyr::select(out, dplyr::one_of("confidence", "kingdom", "phylum", 95 | "class", "order", "family", "genus")), 96 | taxonomy = "GBIF Backbone Taxonomy", 97 | taxonID = paste0("http://www.gbif.org/species/", out$usagekey, ""), 98 | warnings = "" 99 | ) 100 | } 101 | } 102 | if(out$synonym[1] & verbose) warning(paste("Synonym provided! Automatically set to accepted species Name!")) 103 | } 104 | } 105 | class(out) <- c("data.frame") 106 | return(out) 107 | } 108 | -------------------------------------------------------------------------------- /R/standardize_taxonomy.R: -------------------------------------------------------------------------------- 1 | #' Standardize scientific names of species 2 | #' 3 | #' @description Adds columns to a traitdata object containing accepted species 4 | #' names and relates to globally unique taxon identifiers via URI. 5 | #' @usage standardize_taxonomy(x, preferred_data_sources=c(11:15), fuzzy = TRUE, verbose = TRUE, 6 | #' return=c("kingdom", "phylum", "class", "order", "family", "scientificNameStd")) 7 | #' @param x a \code{data.frame} containing at least the column scientificName. 8 | #' @param preferred_data_sources Select the datasources that should be used for name matching, default is GBIF. 9 | #' @param fuzzy if set to `FALSE` (default mode), this disables fuzzy matching 10 | #' if problems with ambiguous species names arise. 11 | #' @param verbose has currently no effect. 12 | #' @param return a character vector containing the informatoin that should be 13 | #' extracted into the output. Valid entries are the column names returned by 14 | #' function `get_taxonomy()`. See 'Details'. 15 | #' 16 | #' @details Taxonomic standardisation is an enormous challenge, as 17 | #' species names constantly change and phylogenetic trees are regularly refined. 18 | #' 19 | #' As a consequence, there is not one reference for accepted species names, as it often 20 | #' depends on the field of research and taxonomic focus. 21 | #' 22 | #' For reasons of simplicity and because of its high coverage of taxa, the 23 | #' function `standardize_taxonomy()` by default uses the GBIF Backbone Taxonomy as its 24 | #' reference system and resolves all provided species names to the accepted 25 | #' name according to GBIF (resolving misspellings and synonyms in the 26 | #' process). 27 | #' 28 | #' @source The initial code from this function was obtained from the `traitdataform` package, 29 | #' which is available on GitHub: \url{https://github.com/EcologicalTraitData/traitdataform}. 30 | #' @author RS-eco 31 | #' @examples 32 | #' \dontrun{ 33 | #' standardize_taxonomy(x=data.frame(scientificName="Equus burchellii")) 34 | #' 35 | #' standardize_taxonomy(x=data.frame(scientificName=c("Equus quagga")), 36 | #' return=c("kingdom", "phylum", "class", "order", "family", "scientificNameStd")) 37 | #' } 38 | #' @export 39 | standardize_taxonomy <- function(x, preferred_data_sources=c(11:15), 40 | fuzzy = TRUE, verbose = TRUE, 41 | return=c("kingdom", "phylum", "class", 42 | "order", "family", "scientificNameStd")) { 43 | if (!requireNamespace("dplyr", quietly = TRUE)) { 44 | utils::install.packages("dplyr") 45 | } 46 | temp <- get_taxonomy(x=levels(droplevels(factor(x$scientificName))), 47 | preferred_data_sources=preferred_data_sources, 48 | fuzzy = fuzzy, verbose = verbose) 49 | if("scientificName" %in% colnames(temp)){ 50 | temp$scientificName <- levels(droplevels(factor(x$scientificName))) 51 | } else{ 52 | temp <- data.frame(cbind(levels(droplevels(factor(x$scientificName))), temp)) 53 | colnames(temp)[1] <- "scientificName" 54 | } 55 | temp <- dplyr::select(temp, "scientificName", dplyr::one_of(return)) 56 | out <- dplyr::left_join(x, temp, by="scientificName") 57 | out <- dplyr::distinct(out) 58 | 59 | # sort columns according to terms 60 | out <- out[, order(match(names(out), c("scientificNameStd")))] 61 | return(out) 62 | } 63 | -------------------------------------------------------------------------------- /README.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "traitdata: R package for easy access to various ecological trait data" 3 | output: github_document 4 | editor_options: 5 | chunk_output_type: console 6 | --- 7 | 8 | ## Installation 9 | 10 | You can install traitdata from Github with: 11 | 12 | ```{r gh-installation, eval=F} 13 | # Install devtools if not available 14 | if(!"remotes" %in% installed.packages()[,"Package"]) install.packages("remotes") 15 | 16 | # Install traitdata package from Github 17 | remotes::install_github("RS-eco/traitdata", build_vignettes = T, force=T) 18 | ``` 19 | 20 | After installation, simply load the `traitdata` package: 21 | 22 | ```{r, eval=F} 23 | library(traitdata) 24 | ``` 25 | 26 | **If you encounter a bug or if you have any problems, please file an [issue](https://github.com/RS-eco/traitdata/issues) on Github.** 27 | 28 | ## Data overview 29 | 30 | There are 32 different data sets, which are included in this package: 31 | 32 | datasetName | basisOfRecord | rightsHolder | DOI 33 | ----------- | ------------- | ------------------ | ----------- 34 | amniota | traitDatabase | Myrhvold et al. 2016 | [10.1890/15-0846R.1](http://doi.org/10.1890/15-0846R.1) 35 | amphi_lifehist | traitDatabase | Trochet et al. 2014 | [10.3897/BDJ.2.e4123](http://doi.org/10.3897/BDJ.2.e4123) 36 | amphibio | traitDatabase | Oliveira et al. 2017 | [10.1038/sdata.2017.123](http://doi.org/10.1038/sdata.2017.123) 37 | an_age | traitDatabase | Tacutu et al. 2018 | [10.1093/nar/gkx1042](http://doi.org/10.1093/nar/gkx1042) 38 | anuran_morpho | traitDatabase | Mendoza-Henao et al. 2019 | [10.1002/ecy.2685](http://doi.org/10.1002/ecy.2685) 39 | arthropods | traitDatabase | Gossner et al. 2015 | [10.1038/sdata.2015.13](http://doi.org/10.1038/sdata.2015.13) 40 | atlantic_birds | traitDatabase | Rodrigues et al. 2019 | [10.1002/ecy.2647](https://doi.org/10.1002/ecy.2647) 41 | australian_birds | traitDatabase | Garnett et al. 2015 | [10.1038/sdata.2015.61](https://doi.org/10.1038/sdata.2015.61) 42 | AvianBodySize | traitDatabase | Lislevand et al. 2007 | [10.1890/06-2054](https://doi.org/10.1890/06-2054) 43 | AVONET | traitDatabase | Tobias et al. 2021 | 44 | [10.6084/m9.figshare.16586228.v2](https://doi.org/10.6084/m9.figshare.16586228.v2) 45 | bird_behav | traitDatabase | Tobias & Pigot 2019 | [10.1098/rstb.2019.0012](http://dx.doi.org/10.1098/rstb.2019.0012) 46 | carabids | traitDatabase | van der Plas et al. 2017 | [10.5061/dryad.53ds2](http://doi.org/10.5061/dryad.53ds2) 47 | climber | traitDatabase | Schweiger et al. 2014 | [10.3897/zookeys.367.6185](http://doi.org/10.3897/zookeys.367.6185) 48 | disperse | traitDatabase | Sarremejane et al. 2020 | [10.1038/s41597-020-00732-7](http://doi.org/10.1038/s41597-020-00732-7) 49 | elton_birds | traitDatabase | Wilman et al. 2014 | [10.1890/13-1917.1](http://doi.org/10.1890/13-1917.1) 50 | elton_mammals | traitDatabase | Wilman et al. 2014 | [10.1890/13-1917.1](http://doi.org/10.1890/13-1917.1) 51 | epiphytes | traitDatabase | Hietz et al. 2021 | [10.1111/1365-2745.13802](https://doi.org/10.1111/1365-2745.13802) 52 | eubirds | traitDatabase | Storchová & Hořák 2017 | [10.1111/geb.12709](https://doi.org/10.1111/geb.12709) 53 | fishmorph | traitDatabase | Brosse et al. 2021 | [10.1111/geb.13395](https://doi.org/10.1111/geb.13395) 54 | globalHWI | traitDatabase | Sheard et al. 2020 | [10.1038/s41467-020-16313-6](http://doi.org/10.1038/s41467-020-16313-6) 55 | globTherm | traitDatabase | Bennett et al. 2018 | [10.1038/sdata.2018.22](https://doi.org/10.1038/sdata.2018.22) 56 | heteroptera | traitDatabase | Gossner et al. 2016 | [10.6084/m9.figshare.c.3307611.v1](https://doi.org/10.6084/m9.figshare.c.3307611.v1) 57 | heteropteraRaw | traitDatabase | Gossner et al. 2016 | [10.6084/m9.figshare.c.3307611.v1](https://doi.org/10.6084/m9.figshare.c.3307611.v1) 58 | lizard_traits | traitDatabase | Meiri 2018 | [10.1111/geb.12773](http://doi.org/10.1111/geb.12773) 59 | mammal_diet | traitDatabase | Kissling et al. 2014 | [10.1002/ece3.1136](http://doi.org/10.1002/ece3.1136) 60 | mammal_diet2 | traitDatabase | Gainsbury et al. 2018 | [10.1111/mam.12119](http://doi.org/10.1111/mam.12119) 61 | 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) 62 | migbehav_birds | literatureData | Eyres & Fritz | [10.12761/SGN.2017.10058](http://doi.org/10.12761/SGN.2017.10058) 63 | pantheria | traitDatabase | Jones et al. 2009 | [10.1890/08-1494.1](http://doi.org/10.1890/08-1494.1) 64 | passerines | traitDatabase | Ricklefs 2017 | [10.1002/ecy.1783](http://doi.org/10.1002/ecy.1783) 65 | primates | traitDatabase | Galán-Acedo et al. 2020 | [10.1038/s41597-019-0059-9](http://doi.org/10.1038/s41597-019-0059-9) 66 | reptile_lifehist | traitDatabase | Grimm et al. 2014 | [10.3897/natureconservation.9.8908](http://doi.org/10.3897/natureconservation.9.8908) 67 | tetra_density | traitDatabase | Santini et al. 2018 | [10.1111/geb.12756](https://doi.org/10.1111/geb.12756) 68 | 69 | **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. 70 | 71 | **See also https://opentraits.org/datasets.html for an extensive list of Trait datasets.** 72 | 73 | An overview of the different datasets can also be found here: `vignette("data_info")`. 74 | 75 | ## Variables 76 | 77 | * All published datasets contain their original variables and species names. 78 | Species names were split into 2 columns (Genus and Species) and where applicable into a 3rd column with Subspecies names. 79 | * All datasets also have a scientificNameStd column, which is a standardised scientific name, 80 | in order to be able to merge the different datasets by species. 81 | 82 | **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. 83 | 84 | An overview of all variables with a description of each variable can be found in the `trait_glossary` data file: 85 | 86 | ```{r} 87 | data(trait_glossary) 88 | ``` 89 | 90 | or in the `glossary` vignette: 91 | 92 | ```{r, eval=F} 93 | vignette("trait_glossary") 94 | ``` 95 | 96 | ## Data query 97 | 98 | To connect to one or more datasets, we simply use the `data()` function. 99 | 100 | ```{r} 101 | # Load Elton Traits 102 | data("elton_birds") 103 | ``` 104 | 105 | Now we can use standard R calls to have a look at the data. 106 | 107 | First, we look at the column names of our dataset. 108 | 109 | ```{r} 110 | # Look at the variable names 111 | colnames(elton_birds) 112 | ``` 113 | 114 | Then, we check the class and first 6 rows of the first 10 columns of the `elton_traits` dataset: 115 | 116 | ```{r} 117 | class(elton_birds) 118 | head(elton_birds[,1:10]) 119 | ``` 120 | 121 | For more information on how to use the data within the package, check out the `access-data` and all the other vignettes. 122 | 123 | ```{r, eval=F} 124 | vignette("access-data") 125 | ``` 126 | 127 | Additional examples of how to use the different trait datasets can be found in the following vignettes: 128 | 129 | ```{r, eval=F} 130 | vignette("island-birds") 131 | vignette("migbehav_birds") 132 | vignette("morpho-indices") 133 | vignette("pantheria") 134 | vignette("passerines") 135 | ``` 136 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | traitdata: R package for easy access to various ecological trait data 2 | ================ 3 | 4 | ## Installation 5 | 6 | You can install traitdata from Github with: 7 | 8 | ``` r 9 | # Install devtools if not available 10 | if(!"remotes" %in% installed.packages()[,"Package"]) install.packages("remotes") 11 | 12 | # Install traitdata package from Github 13 | remotes::install_github("RS-eco/traitdata", build_vignettes = T, force=T) 14 | ``` 15 | 16 | After installation, simply load the `traitdata` package: 17 | 18 | ``` r 19 | library(traitdata) 20 | ``` 21 | 22 | **If you encounter a bug or if you have any problems, please file an 23 | [issue](https://github.com/RS-eco/traitdata/issues) on Github.** 24 | 25 | ## Data overview 26 | 27 | There are 32 different data sets, which are included in this package: 28 | 29 | | datasetName | basisOfRecord | rightsHolder | DOI | 30 | |-------------------|----------------|---------------------------|--------------------------------------------------------------------------------------------------------------------------| 31 | | amniota | traitDatabase | Myrhvold et al. 2016 | [10.1890/15-0846R.1](http://doi.org/10.1890/15-0846R.1) | 32 | | amphi\_lifehist | traitDatabase | Trochet et al. 2014 | [10.3897/BDJ.2.e4123](http://doi.org/10.3897/BDJ.2.e4123) | 33 | | amphibio | traitDatabase | Oliveira et al. 2017 | [10.1038/sdata.2017.123](http://doi.org/10.1038/sdata.2017.123) | 34 | | an\_age | traitDatabase | Tacutu et al. 2018 | [10.1093/nar/gkx1042](http://doi.org/10.1093/nar/gkx1042) | 35 | | anuran\_morpho | traitDatabase | Mendoza-Henao et al. 2019 | [10.1002/ecy.2685](http://doi.org/10.1002/ecy.2685) | 36 | | arthropods | traitDatabase | Gossner et al. 2015 | [10.1038/sdata.2015.13](http://doi.org/10.1038/sdata.2015.13) | 37 | | atlantic\_birds | traitDatabase | Rodrigues et al. 2019 | [10.1002/ecy.2647](https://doi.org/10.1002/ecy.2647) | 38 | | australian\_birds | traitDatabase | Garnett et al. 2015 | [10.1038/sdata.2015.61](https://doi.org/10.1038/sdata.2015.61) | 39 | | AvianBodySize | traitDatabase | Lislevand et al. 2007 | [10.1890/06-2054](https://doi.org/10.1890/06-2054) | 40 | | bird\_behav | traitDatabase | Tobias & Pigot 2019 | [10.1098/rstb.2019.0012](http://dx.doi.org/10.1098/rstb.2019.0012) | 41 | | carabids | traitDatabase | van der Plas et al. 2017 | [10.5061/dryad.53ds2](http://doi.org/10.5061/dryad.53ds2) | 42 | | climber | traitDatabase | Schweiger et al. 2014 | [10.3897/zookeys.367.6185](http://doi.org/10.3897/zookeys.367.6185) | 43 | | disperse | traitDatabase | Sarremejane et al. 2020 | [10.1038/s41597-020-00732-7](http://doi.org/10.1038/s41597-020-00732-7) | 44 | | elton\_birds | traitDatabase | Wilman et al. 2014 | [10.1890/13-1917.1](http://doi.org/10.1890/13-1917.1) | 45 | | elton\_mammals | traitDatabase | Wilman et al. 2014 | [10.1890/13-1917.1](http://doi.org/10.1890/13-1917.1) | 46 | | epiphytes | traitDatabase | Hietz et al. 2021 | [10.1111/1365-2745.13802](https://doi.org/10.1111/1365-2745.13802) | 47 | | eubirds | traitDatabase | Storchová & Hořák 2017 | [10.1111/geb.12709](https://doi.org/10.1111/geb.12709) | 48 | | fishmorph | traitDatabase | Brosse et al. 2021 | [10.1111/geb.13395](https://doi.org/10.1111/geb.13395) | 49 | | globalHWI | traitDatabase | Sheard et al. 2020 | [10.1038/s41467-020-16313-6](http://doi.org/10.1038/s41467-020-16313-6) | 50 | | globTherm | traitDatabase | Bennett et al. 2018 | [10.1038/sdata.2018.22](https://doi.org/10.1038/sdata.2018.22) | 51 | | heteroptera | traitDatabase | Gossner et al. 2016 | [10.6084/m9.figshare.c.3307611.v1](https://doi.org/10.6084/m9.figshare.c.3307611.v1) | 52 | | heteropteraRaw | traitDatabase | Gossner et al. 2016 | [10.6084/m9.figshare.c.3307611.v1](https://doi.org/10.6084/m9.figshare.c.3307611.v1) | 53 | | lizard\_traits | traitDatabase | Meiri 2018 | [10.1111/geb.12773](http://doi.org/10.1111/geb.12773) | 54 | | mammal\_diet | traitDatabase | Kissling et al. 2014 | [10.1002/ece3.1136](http://doi.org/10.1002/ece3.1136) | 55 | | mammal\_diet2 | traitDatabase | Gainsbury et al. 2018 | [10.1111/mam.12119](http://doi.org/10.1111/mam.12119) | 56 | | 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%5B3531:TEBOLH%5D2.0.CO;2) | 57 | | migbehav\_birds | literatureData | Eyres & Fritz | [10.12761/SGN.2017.10058](http://doi.org/10.12761/SGN.2017.10058) | 58 | | pantheria | traitDatabase | Jones et al. 2009 | [10.1890/08-1494.1](http://doi.org/10.1890/08-1494.1) | 59 | | passerines | traitDatabase | Ricklefs 2017 | [10.1002/ecy.1783](http://doi.org/10.1002/ecy.1783) | 60 | | primates | traitDatabase | Galán-Acedo et al. 2020 | [10.1038/s41597-019-0059-9](http://doi.org/10.1038/s41597-019-0059-9) | 61 | | reptile\_lifehist | traitDatabase | Grimm et al. 2014 | [10.3897/natureconservation.9.8908](http://doi.org/10.3897/natureconservation.9.8908) | 62 | | tetra\_density | traitDatabase | Santini et al. 2018 | [10.1111/geb.12756](https://doi.org/10.1111/geb.12756) | 63 | 64 | **Note:** The code for how these datatsets were downloaded and processed 65 | can be found in the 66 | [data-raw](https://github.com/RS-eco/traitdata/tree/main/data-raw) 67 | folder. 68 | 69 | **See also for an extensive list 70 | of Trait datasets.** 71 | 72 | An overview of the different datasets can also be found here: 73 | `vignette("data_info")`. 74 | 75 | ## Variables 76 | 77 | - All published datasets contain their original variables and species 78 | names. Species names were split into 2 columns (Genus and Species) 79 | and where applicable into a 3rd column with Subspecies names. 80 | - All datasets also have a scientificNameStd column, which is a 81 | standardised scientific name, in order to be able to merge the 82 | different datasets by species. 83 | 84 | **Note:** Not all species names could be standardised, therefore some 85 | data entries might not contain a scientificNameStd value, please then 86 | refer to the Genus and Species column. In case you are interested in 87 | which species could not be standardised have a look at the 88 | `names_nonStd` file. Please also check out the `synonyms` data file, for 89 | species where an alternative name has been used for standardising the 90 | scientific name. 91 | 92 | An overview of all variables with a description of each variable can be 93 | found in the `trait_glossary` data file: 94 | 95 | ``` r 96 | data(trait_glossary) 97 | ``` 98 | 99 | or in the `glossary` vignette: 100 | 101 | ``` r 102 | vignette("trait_glossary") 103 | ``` 104 | 105 | ## Data query 106 | 107 | To connect to one or more datasets, we simply use the `data()` function. 108 | 109 | ``` r 110 | # Load Elton Traits 111 | data("elton_birds") 112 | ``` 113 | 114 | Now we can use standard R calls to have a look at the data. 115 | 116 | First, we look at the column names of our dataset. 117 | 118 | ``` r 119 | # Look at the variable names 120 | colnames(elton_birds) 121 | ``` 122 | 123 | ## [1] "SpecID" "PassNonPass" "Order" 124 | ## [4] "Family" "BLFamilyEnglish" "BLFamSequID" 125 | ## [7] "Taxo" "Genus" "Species" 126 | ## [10] "English" "Diet.Inv" "Diet.Vend" 127 | ## [13] "Diet.Vect" "Diet.Vfish" "Diet.Vunk" 128 | ## [16] "Diet.Scav" "Diet.Fruit" "Diet.Nect" 129 | ## [19] "Diet.Seed" "Diet.PlantO" "Diet.5Cat" 130 | ## [22] "Diet.Source" "Diet.Certainty" "Diet.EnteredBy" 131 | ## [25] "ForStrat.watbelowsurf" "ForStrat.wataroundsurf" "ForStrat.ground" 132 | ## [28] "ForStrat.understory" "ForStrat.midhigh" "ForStrat.canopy" 133 | ## [31] "ForStrat.aerial" "PelagicSpecialist" "ForStrat.Source" 134 | ## [34] "ForStrat.SpecLevel" "ForStrat.EnteredBy" "Nocturnal" 135 | ## [37] "BodyMass.Value" "BodyMass.Source" "BodyMass.SpecLevel" 136 | ## [40] "BodyMass.Comment" "Record.Comment" "Full.Reference" 137 | ## [43] "scientificNameStd" 138 | 139 | Then, we check the class and first 6 rows of the first 10 columns of the 140 | `elton_traits` dataset: 141 | 142 | ``` r 143 | class(elton_birds) 144 | ``` 145 | 146 | ## [1] "data.frame" 147 | 148 | ``` r 149 | head(elton_birds[,1:10]) 150 | ``` 151 | 152 | ## SpecID PassNonPass Order Family BLFamilyEnglish 153 | ## 1 28 Nonpasseriformes Struthioniformes Struthionidae Ostriches 154 | ## 2 37 Nonpasseriformes Rheiformes Rheidae Rheas 155 | ## 3 38 Nonpasseriformes Rheiformes Rheidae Rheas 156 | ## 4 45 Nonpasseriformes Casuariiformes Casuariidae Cassowaries 157 | ## 5 46 Nonpasseriformes Casuariiformes Casuariidae Cassowaries 158 | ## 6 47 Nonpasseriformes Casuariiformes Casuariidae Cassowaries 159 | ## BLFamSequID Taxo Genus Species English 160 | ## 1 2 BL3 Struthio camelus Ostrich 161 | ## 2 3 BL3 Rhea americana Greater Rhea 162 | ## 3 3 BL3 Rhea pennata Lesser Rhea 163 | ## 4 4 BL3 Casuarius casuarius Southern Cassowary 164 | ## 5 4 BL3 Casuarius bennetti Dwarf Cassowary 165 | ## 6 4 BL3 Casuarius unappendiculatus Northern Cassowary 166 | 167 | For more information on how to use the data within the package, check 168 | out the `access-data` and all the other vignettes. 169 | 170 | ``` r 171 | vignette("access-data") 172 | ``` 173 | 174 | Additional examples of how to use the different trait datasets can be 175 | found in the following vignettes: 176 | 177 | ``` r 178 | vignette("island-birds") 179 | vignette("migbehav_birds") 180 | vignette("morpho-indices") 181 | vignette("pantheria") 182 | vignette("passerines") 183 | ``` 184 | -------------------------------------------------------------------------------- /data-raw/standardise-names.R: -------------------------------------------------------------------------------- 1 | #' # Merge taxon names 2 | 3 | #' Check how old the taxonomyStd file is and 4 | #' if it is older than 90 days, delete it! 5 | if(file.exists("data/taxonomyStd.rda")){ 6 | current_date <- Sys.Date() 7 | file_date <- as.Date(tail(file.info("data/taxonomyStd.rda")$ctime)) 8 | if(as.numeric(current_date - file_date) > 90){ 9 | file.remove("data/taxonomyStd.rda") 10 | } 11 | } 12 | 13 | #' Read data files 14 | datafiles <- list.files("data", pattern=".rda", full.names=T) 15 | datafiles <- datafiles[!datafiles %in% c("data/taxonomyStd.rda", "data/synonyms.rda", 16 | "data/trait_glossary.rda", "data/names_nonStd.rda")] 17 | length(datafiles) 18 | data <- lapply(datafiles, FUN=function(x) get(load(x))); gc() 19 | 20 | #' Subspecies names, are not considered for name matching 21 | 22 | #' Merge data files and create species name vector 23 | library(dplyr) 24 | data <- lapply(data, FUN=function(x) select(x, "Genus", "Species")) 25 | data_names <- bind_rows(data) %>% group_by(Genus, Species) %>% 26 | summarise(n=n()) %>% select(-n) %>% 27 | tidyr::unite(Genus, Species, col="scientificName", sep=" ", remove=F) 28 | 29 | # Remove subspecies 30 | data_names$scientificName <- gsub(x=data_names$scientificName, pattern="_", replacement=" ") 31 | data_names$scientificName[data_names$scientificName == "Acrocephalus familiaris kingi"] <- 32 | "Acrocephalus familiaris" 33 | 34 | # Change wrong scientificNames to their synonyms 35 | load("data/synonyms.rda") 36 | colnames(synonyms) <- c("Genus", "Species", "scientificName") 37 | data_names <- anti_join(data_names, synonyms, by=c("Genus", "Species")) %>% 38 | bind_rows(synonyms); gc() 39 | 40 | # Get standardised species names 41 | source("R/get_taxonomy.R") 42 | source("R/standardize_taxonomy.R") 43 | if(!file.exists("data/taxonomyStd.rda")){ 44 | data_names$scientificName <- factor(data_names$scientificName) 45 | taxonomyStd <- standardize_taxonomy(x=data_names, 46 | return=c("kingdom", 47 | "phylum", 48 | "class", 49 | "order", 50 | "family", 51 | "scientificNameStd")); rm(data_names) 52 | taxonomyStd %<>% select("scientificName", "Genus", "Species", "kingdom", 53 | "phylum", "class", "order", "family", "scientificNameStd") 54 | taxonomyStd$scientificName <- iconv(taxonomyStd$scientificName, "latin1", "UTF-8") 55 | taxonomyStd$Genus <- iconv(taxonomyStd$Genus, "latin1", "UTF-8") 56 | taxonomyStd$Species <- iconv(taxonomyStd$Species, "latin1", "UTF-8") 57 | taxonomyStd$scientificNameStd <- iconv(taxonomyStd$scientificNameStd, "latin1", "UTF-8") 58 | names_nonStd <- taxonomyStd[is.na(taxonomyStd$scientificNameStd),] %>% select(Genus, Species, scientificName) 59 | taxonomyStd <- taxonomyStd[!is.na(taxonomyStd$scientificNameStd),] 60 | save(taxonomyStd, file="data/taxonomyStd.rda", compress="xz") 61 | if(file.exists("data/names_nonStd.rda")){ 62 | names_non_std_old <- get(load("data/names_nonStd.rda")) 63 | names_nonStd <- rbind(names_non_std_old, names_nonStd); rm(names_non_std_old) 64 | distinct(names_nonStd) 65 | } 66 | if(length(names_nonStd)){ 67 | save(names_nonStd, file="data/names_nonStd.rda", compress="xz") 68 | print() 69 | } 70 | } else{ 71 | load("data/taxonomyStd.rda") 72 | 73 | # Only keep standardised names that are within the datasets 74 | taxonomyStd <- taxonomyStd[taxonomyStd$scientificName %in% data_names$scientificName,] 75 | 76 | # Get missing names 77 | names_new <- data_names[!data_names$scientificName %in% taxonomyStd$scientificName,] 78 | 79 | if(nrow(names_new) > 0){ 80 | library(magrittr) 81 | #' Get new standardised species names 82 | names_new$scientificName <- factor(names_new$scientificName) 83 | names_new <- standardize_taxonomy(x=names_new, 84 | return=c("kingdom", "phylum", 85 | "class", "order", 86 | "family", "scientificNameStd")) 87 | colnames(names_new) 88 | 89 | #' Merge the two standardised name files 90 | taxonomyStd <- plyr::rbind.fill(taxonomyStd, names_new) 91 | taxonomyStd$scientificName <- iconv(taxonomyStd$scientificName, "latin1", "UTF-8") 92 | taxonomyStd$kingdom <- iconv(taxonomyStd$kingdom, "latin1", "UTF-8") 93 | taxonomyStd$phylum <- iconv(taxonomyStd$phylum, "latin1", "UTF-8") 94 | taxonomyStd$class <- iconv(taxonomyStd$class, "latin1", "UTF-8") 95 | taxonomyStd$order <- iconv(taxonomyStd$order, "latin1", "UTF-8") 96 | taxonomyStd$family <- iconv(taxonomyStd$family, "latin1", "UTF-8") 97 | taxonomyStd$Genus <- iconv(taxonomyStd$Genus, "latin1", "UTF-8") 98 | taxonomyStd$Species <- iconv(taxonomyStd$Species, "latin1", "UTF-8") 99 | taxonomyStd$scientificNameStd <- iconv(taxonomyStd$scientificNameStd, "latin1", "UTF-8") 100 | 101 | #' Check non-standardised files with synonyms file 102 | names_nonStd <- taxonomyStd[is.na(taxonomyStd$scientificNameStd),] 103 | names_nonStd <- names_nonStd[,c("Genus", "Species", "scientificName")] 104 | 105 | #' Save non-standardised names to file 106 | if(nrow(names_nonStd) > 0){ 107 | save(names_nonStd, file="data/names_nonStd.rda", compress="xz") 108 | message("There are still non-standardised names present!!!") 109 | } else{ 110 | file.remove("data/names_nonStd.rda") 111 | } 112 | 113 | #' Save standardised names 114 | taxonomyStd <- taxonomyStd[!is.na(taxonomyStd$scientificNameStd),] 115 | save(taxonomyStd, file="data/taxonomyStd.rda", compress="xz") 116 | } 117 | } 118 | 119 | #' Add scientifcNameStd to original data files 120 | data <- lapply(datafiles, FUN=function(x) get(load(x)) %>% left_join(taxonomyStd) %>% 121 | select(-scientificName, -kingdom, -phylum, -order, -class, -family) %>% 122 | droplevels()) 123 | names(data) <- sub(basename(datafiles), pattern=".rda", replacement="") 124 | 125 | #' Save data files 126 | for(i in 1:length(data)){ 127 | assign(names(data)[[i]], data[[i]]) 128 | save(list=ls(pattern=names(data)[[i]]), file = datafiles[i], compress="xz") 129 | } 130 | 131 | # Update synonyms file to only keep standardised Names 132 | load("data/synonyms.rda") 133 | colnames(synonyms) <- c("Genus", "Species", "scientificName") 134 | load("data/taxonomyStd.rda") 135 | taxon_sub <- taxonomyStd %>% distinct(scientificName, scientificNameStd) 136 | synonyms <- inner_join(synonyms, taxon_sub, by="scientificName") %>% 137 | select(-scientificNameStd) 138 | save(synonyms, file="data/synonyms.rda", compress="xz") 139 | 140 | #' Remove files from environment 141 | rm(list=ls()) 142 | -------------------------------------------------------------------------------- /data/AvianBodySize.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RS-eco/traitdata/5560f5a609e2c891c23c36ae0cc25c56c81c64ac/data/AvianBodySize.rda -------------------------------------------------------------------------------- /data/amniota.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RS-eco/traitdata/5560f5a609e2c891c23c36ae0cc25c56c81c64ac/data/amniota.rda -------------------------------------------------------------------------------- /data/amphi_lifehist.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RS-eco/traitdata/5560f5a609e2c891c23c36ae0cc25c56c81c64ac/data/amphi_lifehist.rda -------------------------------------------------------------------------------- /data/amphibio.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RS-eco/traitdata/5560f5a609e2c891c23c36ae0cc25c56c81c64ac/data/amphibio.rda -------------------------------------------------------------------------------- /data/an_age.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RS-eco/traitdata/5560f5a609e2c891c23c36ae0cc25c56c81c64ac/data/an_age.rda -------------------------------------------------------------------------------- /data/anuran_morpho.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RS-eco/traitdata/5560f5a609e2c891c23c36ae0cc25c56c81c64ac/data/anuran_morpho.rda -------------------------------------------------------------------------------- /data/arthropods.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RS-eco/traitdata/5560f5a609e2c891c23c36ae0cc25c56c81c64ac/data/arthropods.rda -------------------------------------------------------------------------------- /data/atlantic_birds.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RS-eco/traitdata/5560f5a609e2c891c23c36ae0cc25c56c81c64ac/data/atlantic_birds.rda -------------------------------------------------------------------------------- /data/australian_birds.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RS-eco/traitdata/5560f5a609e2c891c23c36ae0cc25c56c81c64ac/data/australian_birds.rda -------------------------------------------------------------------------------- /data/avonet.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RS-eco/traitdata/5560f5a609e2c891c23c36ae0cc25c56c81c64ac/data/avonet.rda -------------------------------------------------------------------------------- /data/bird_behav.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RS-eco/traitdata/5560f5a609e2c891c23c36ae0cc25c56c81c64ac/data/bird_behav.rda -------------------------------------------------------------------------------- /data/carabids.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RS-eco/traitdata/5560f5a609e2c891c23c36ae0cc25c56c81c64ac/data/carabids.rda -------------------------------------------------------------------------------- /data/climber.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RS-eco/traitdata/5560f5a609e2c891c23c36ae0cc25c56c81c64ac/data/climber.rda -------------------------------------------------------------------------------- /data/disperse.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RS-eco/traitdata/5560f5a609e2c891c23c36ae0cc25c56c81c64ac/data/disperse.rda -------------------------------------------------------------------------------- /data/elton_birds.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RS-eco/traitdata/5560f5a609e2c891c23c36ae0cc25c56c81c64ac/data/elton_birds.rda -------------------------------------------------------------------------------- /data/elton_mammals.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RS-eco/traitdata/5560f5a609e2c891c23c36ae0cc25c56c81c64ac/data/elton_mammals.rda -------------------------------------------------------------------------------- /data/epiphytes.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RS-eco/traitdata/5560f5a609e2c891c23c36ae0cc25c56c81c64ac/data/epiphytes.rda -------------------------------------------------------------------------------- /data/eubirds.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RS-eco/traitdata/5560f5a609e2c891c23c36ae0cc25c56c81c64ac/data/eubirds.rda -------------------------------------------------------------------------------- /data/fishmorph.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RS-eco/traitdata/5560f5a609e2c891c23c36ae0cc25c56c81c64ac/data/fishmorph.rda -------------------------------------------------------------------------------- /data/globTherm.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RS-eco/traitdata/5560f5a609e2c891c23c36ae0cc25c56c81c64ac/data/globTherm.rda -------------------------------------------------------------------------------- /data/globalHWI.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RS-eco/traitdata/5560f5a609e2c891c23c36ae0cc25c56c81c64ac/data/globalHWI.rda -------------------------------------------------------------------------------- /data/heteroptera.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RS-eco/traitdata/5560f5a609e2c891c23c36ae0cc25c56c81c64ac/data/heteroptera.rda -------------------------------------------------------------------------------- /data/heteropteraRaw.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RS-eco/traitdata/5560f5a609e2c891c23c36ae0cc25c56c81c64ac/data/heteropteraRaw.rda -------------------------------------------------------------------------------- /data/lizard_traits.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RS-eco/traitdata/5560f5a609e2c891c23c36ae0cc25c56c81c64ac/data/lizard_traits.rda -------------------------------------------------------------------------------- /data/mammal_diet.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RS-eco/traitdata/5560f5a609e2c891c23c36ae0cc25c56c81c64ac/data/mammal_diet.rda -------------------------------------------------------------------------------- /data/mammal_diet2.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RS-eco/traitdata/5560f5a609e2c891c23c36ae0cc25c56c81c64ac/data/mammal_diet2.rda -------------------------------------------------------------------------------- /data/marsupials.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RS-eco/traitdata/5560f5a609e2c891c23c36ae0cc25c56c81c64ac/data/marsupials.rda -------------------------------------------------------------------------------- /data/migbehav_birds.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RS-eco/traitdata/5560f5a609e2c891c23c36ae0cc25c56c81c64ac/data/migbehav_birds.rda -------------------------------------------------------------------------------- /data/names_nonStd.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RS-eco/traitdata/5560f5a609e2c891c23c36ae0cc25c56c81c64ac/data/names_nonStd.rda -------------------------------------------------------------------------------- /data/pantheria.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RS-eco/traitdata/5560f5a609e2c891c23c36ae0cc25c56c81c64ac/data/pantheria.rda -------------------------------------------------------------------------------- /data/passerines.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RS-eco/traitdata/5560f5a609e2c891c23c36ae0cc25c56c81c64ac/data/passerines.rda -------------------------------------------------------------------------------- /data/primates.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RS-eco/traitdata/5560f5a609e2c891c23c36ae0cc25c56c81c64ac/data/primates.rda -------------------------------------------------------------------------------- /data/reptile_lifehist.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RS-eco/traitdata/5560f5a609e2c891c23c36ae0cc25c56c81c64ac/data/reptile_lifehist.rda -------------------------------------------------------------------------------- /data/synonyms.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RS-eco/traitdata/5560f5a609e2c891c23c36ae0cc25c56c81c64ac/data/synonyms.rda -------------------------------------------------------------------------------- /data/taxonomyStd.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RS-eco/traitdata/5560f5a609e2c891c23c36ae0cc25c56c81c64ac/data/taxonomyStd.rda -------------------------------------------------------------------------------- /data/tetra_density.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RS-eco/traitdata/5560f5a609e2c891c23c36ae0cc25c56c81c64ac/data/tetra_density.rda -------------------------------------------------------------------------------- /data/trait_glossary.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RS-eco/traitdata/5560f5a609e2c891c23c36ae0cc25c56c81c64ac/data/trait_glossary.rda -------------------------------------------------------------------------------- /man/AvianBodySize.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/traitdata-package.R 3 | \docType{data} 4 | \name{AvianBodySize} 5 | \alias{AvianBodySize} 6 | \title{Database on Avian body sizes} 7 | \format{ 8 | A \code{data.frame} with 3802 observations and 46 variables. 9 | } 10 | \source{ 11 | When using this data, please cite the original publication: 12 | \itemize{\item Lislevand et al. 2007 (Ecology) AVIAN BODY SIZES IN RELATION TO FECUNDITY, 13 | MATING SYSTEM, DISPLAY BEHAVIOR, AND RESOURCE SHARINGe.}. 14 | } 15 | \usage{ 16 | data(AvianBodySize) 17 | } 18 | \description{ 19 | Data on Avian bod sizes 20 | } 21 | \details{ 22 | Species‐specific measurements on male and female body mass, wing length, 23 | tarsus length, bill length, and tail length from major ornithological text books and 24 | some other sources covering bird species of Africa, Australia, New Zealand, 25 | Antarctica, North America, and the western Palearctic. These measurements were 26 | matched with measures of egg and clutch sizes, and scores of mating system, 27 | sexual display agility, and the degree of intersexual resource division. We present 28 | morphometric data ranging from 2350 species (minimum, tail length) to 2979 species (maximum, wing length) 29 | where measurements for both sexes are known, some additional data where only one sex or unsexed birds 30 | have been measured, and explanatory data ranging from 1218 species (minimum, display agility) 31 | to 2603 species (maximum, egg mass). In total, 3769 species from 125 of 146 different bird families are included. 32 | } 33 | -------------------------------------------------------------------------------- /man/amniota.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/traitdata-package.R 3 | \name{amniota} 4 | \alias{amniota} 5 | \title{Amniote life-history traits} 6 | \format{ 7 | A \code{data.frame} with 21330 observations and 37 variables. 8 | } 9 | \source{ 10 | Cite this dataset as: \itemize{ \item P. Myhrvold, Nathan; Baldridge, 11 | Elita; Chan, Benjamin; Sivam, Dhileep; L. Freeman, Daniel; Ernest, S. K. 12 | Morgan (2016): An amniote life-history database to perform comparative 13 | analyses with birds, mammals, and reptiles. \url{http://esapubs.org/archive/ecol/E096/269/}.} 14 | 15 | \href{http://creativecommons.org/publicdomain/zero/1.0/}{Creative Commons 16 | 0}. To the extent possible under law, the authors have waived all copyright 17 | and related or neighboring rights to this data. 18 | } 19 | \usage{ 20 | data(amniota) 21 | } 22 | \description{ 23 | An amniote life-history database to perform comparative analyses 24 | with birds, mammals, and reptiles. 25 | } 26 | \details{ 27 | #' @docType data 28 | 29 | Studying life-history traits within and across taxonomic 30 | classifications has revealed many interesting and important patterns, but 31 | this approach to life history requires access to large compilations of data 32 | containing many different life-history parameters. Currently, life-history 33 | data for amniotes (birds, mammals, and reptiles) is split among a variety 34 | of publicly available databases, data tables embedded in individual papers 35 | and books, and species-specific studies by experts. Using data from this 36 | wide range of sources is a challenge for conducting macroecological studies 37 | because of a lack of standardization in taxonomic classifications, 38 | parameter values, and even in which parameters are reported. In order to 39 | facilitate comparative analyses between amniote life-history data, we 40 | created a database compiled from peer-reviewed studies on individual 41 | species, macroecological studies of multiple species, existing life-history 42 | databases, and other aggregated sources as well as published books and 43 | other compilations. First, we extracted and aggregated the raw data from 44 | the aforementioned sources. Next, we resolved spelling errors and other 45 | formatting inconsistencies in species names through a number of 46 | computational and manual methods. Once this was completed, subspecies-level 47 | data and species-level data were shared via a data-sharing algorithm to 48 | accommodate the variety of species transformations (taxonomic promotions, 49 | demotions, merges, divergences, etc.) that have occurred over time. 50 | Finally, in species where multiple raw data points were identified for a 51 | given parameter, we report the median value. Here, we report a normalized 52 | and consolidated database of up to 29 life-history parameters, containing 53 | at least one life-history parameter for 21 322 species of birds, mammals, 54 | and reptiles. 55 | } 56 | \section{Measures}{ 57 | 58 | 59 | \itemize{ 60 | \item Class, Order, Family, Genus, Species, Subspecies, common_name, 61 | \item female_maturity_d, litter_or_clutch_size_n, litters_or_clutches_per_y, adult_body_mass_g, 62 | \item maximum_longevity_y, gestation_d, weaning_d, birth_or_hatching_weight_g, weaning_weight_g, 63 | \item egg_mass_g, incubation_d, fledging_age_d, longevity_y, male_maturity_d, inter_litter_or_interbirth_interval_y, 64 | \item female_body_mass_g, male_body_mass_g, no_sex_body_mass_g, egg_width_mm, egg_length_mm, 65 | \item adult_svl_cm, male_svl_cm, female_svl_cm, birth_or_hatching_svl_cm, 66 | \item female_svl_at_maturity_cm, female_body_mass_at_maturity_g, no_sex_svl_cm, no_sex_maturity_d, 67 | \item scientificNameStd 68 | } 69 | } 70 | 71 | -------------------------------------------------------------------------------- /man/amphi_lifehist.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/traitdata-package.R 3 | \docType{data} 4 | \name{amphi_lifehist} 5 | \alias{amphi_lifehist} 6 | \title{Life-history traits of European amphibians} 7 | \format{ 8 | A \code{data.frame} with 86 observations and 256 variables. 9 | } 10 | \source{ 11 | Cite this dataset as: \itemize{\item Trochet A, Moulherat S, Calvez O, Stevens V, Clobert J, Schmeller D (2014) A database of life-history 12 | traits of European amphibians. Biodiversity Data Journal 2: e4123. \href{http://doi.org/10.3897/BDJ.2.e4123}{10.3897/BDJ.2.e4123}.} 13 | } 14 | \usage{ 15 | data(amphi_lifehist) 16 | } 17 | \description{ 18 | A database of life-history traits of European amphibians 19 | } 20 | \details{ 21 | In the current context of climate change and landscape fragmentation, efficient 22 | conservation strategies require the explicit consideration of life history traits. This is 23 | particularly true for amphibians, which are highly threatened worldwide, composed by more 24 | than 7400 species, which is constitute one of the most species-rich vertebrate groups. The 25 | collection of information on life history traits is difficult due to the ecology of species and 26 | remoteness of their habitats. It is therefore not surprising that our knowledge is limited, and 27 | missing information on certain life history traits are common for in this species group. We 28 | compiled data on amphibian life history traits from literature in an extensive database with 29 | morphological and behavioral traits, habitat preferences and movement abilities for 86 30 | European amphibian species (50 Anuran and 36 Urodela species). When it were available, 31 | we reported data for males, females, juveniles and tadpoles. Our database may serve as 32 | an important starting point for further analyses regarding amphibian conservation. 33 | } 34 | -------------------------------------------------------------------------------- /man/amphibio.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/traitdata-package.R 3 | \docType{data} 4 | \name{amphibio} 5 | \alias{amphibio} 6 | \title{A global database for amphibian ecological traits} 7 | \format{ 8 | A \code{data.frame} with 6776 observations and 39 variables. 9 | } 10 | \source{ 11 | Cite this dataset as: \itemize{\item Oliveira, B.F., Sao-Pedro, V.A., Santos-Barrera, G., Penone, 12 | C. & Costa, G.C. (2017). AmphiBIO, a global database for amphibian ecological traits. 13 | Scientific Data. \href{https://www.nature.com/articles/sdata2017123}{10.1038/sdata.2017.123}.} 14 | 15 | Please also cite the data repository on figshare: \itemize{\item Oliveira, Brunno Freire; Sao-Pedro, 16 | Vinicius Avelar; Santos-Barrera, Georgina; Penone, Caterina; C. Costa, Gabriel (2017): 17 | AmphiBIO_v1. \href{https://doi.org/10.6084/m9.figshare.4644424.v5}{10.6084/m9.figshare.4644424.v5}.} 18 | } 19 | \usage{ 20 | data(amphibio) 21 | } 22 | \description{ 23 | A comprehensive database of natural history traits for amphibians worldwide. 24 | } 25 | \details{ 26 | Current ecological and evolutionary research are increasingly moving from species- to trait-based approaches 27 | because traits provide a stronger link to organism's function and fitness. Trait databases covering a large number of species 28 | are becoming available, but such data remains scarce for certain groups. Amphibians are among the most diverse vertebrate groups 29 | on Earth, and constitute an abundant component of major terrestrial and freshwater ecosystems. They are also facing rapid population 30 | declines worldwide, which is likely to affect trait composition in local communities, thereby impacting ecosystem processes 31 | and services. In this context, we introduce AmphiBIO, a comprehensive database of natural history traits for amphibians worldwide. 32 | The database releases information on 17 traits related to ecology, morphology and reproduction features of amphibians. We compiled data 33 | from more than 1500 literature sources, and for more than 6500 species of all orders, 61 families and 531 genera. 34 | This database has the potential to allow unprecedented large-scale analyses in ecology, evolution and conservation of amphibians. 35 | } 36 | \section{Measures}{ 37 | 38 | \itemize{ 39 | \item id, Order, Family, Genus, Species, 40 | \item Fos, Ter, Aqu, Arb, Leaves, Flowers, Seeds, Fruits, 41 | \item Arthro, Vert, Diu, Noc, Crepu, Wet_warm, Wet_cold, Dry_warm, Dry_cold, 42 | \item Body_mass_g, Age_at_maturity_min_y, Age_at_maturity_max_y, Body_size_mm, 43 | \item Size_at_maturity_min_mm, Size_at_maturity_max_mm, Longevity_max_y, Litter_size_min_n, Litter_size_max_n, 44 | \item Reproductive_output_y, Offspring_size_min_mm, Offspring_size_max_mm, Dir, Lar, Viv, OBS, 45 | \item scientificNameStd 46 | } 47 | } 48 | 49 | -------------------------------------------------------------------------------- /man/an_age.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/traitdata-package.R 3 | \docType{data} 4 | \name{an_age} 5 | \alias{an_age} 6 | \title{Database of Animal Ageing and Longevity} 7 | \format{ 8 | A \code{data.frame} with 4219 observations and 32 variables. 9 | } 10 | \source{ 11 | When using this data, please cite the original publication: 12 | \itemize{\item Tacutu, R., Craig, T., Budovsky, A., Wuttke, D., Lehmann, G., Taranukha, D., Costa, J., Fraifeld, V. E., de Magalhaes, J. P. (2013) 13 | "Human Ageing Genomic Resources: Integrated databases and tools for the biology and genetics of ageing." 14 | Nucleic Acids Research 41(D1):D1027-D1033.} 15 | } 16 | \usage{ 17 | data(an_age) 18 | } 19 | \description{ 20 | Data on animal ageing and longevity 21 | } 22 | \details{ 23 | The data set comprises data on the age and longevity of multiple animal species 24 | } 25 | -------------------------------------------------------------------------------- /man/anuran_morpho.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/traitdata-package.R 3 | \docType{data} 4 | \name{anuran_morpho} 5 | \alias{anuran_morpho} 6 | \title{Database of Animal Ageing and Longevity} 7 | \format{ 8 | A \code{data.frame} with 4623 observations and 29 variables. 9 | } 10 | \source{ 11 | When using this data, please cite the original publication: 12 | \itemize{\item Mendoza-Henao et al. (2019) 13 | "A morphological database for Colombian anuran species from conservation‐priority ecosystems." 14 | Ecology 100.} 15 | } 16 | \usage{ 17 | data(anuran_morpho) 18 | } 19 | \description{ 20 | Data on animal ageing and longevity 21 | } 22 | \details{ 23 | The data set comprises morphological data for Colombian anuran species. 24 | } 25 | -------------------------------------------------------------------------------- /man/arthropods.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/traitdata-package.R 3 | \docType{data} 4 | \name{arthropods} 5 | \alias{arthropods} 6 | \title{Functional Arthropod Traits} 7 | \format{ 8 | A \code{data.frame} with 1230 observations and 19 variables. 9 | } 10 | \source{ 11 | When using this data, please cite the original publication: 12 | 13 | \itemize{\item Gossner MM, Simons NK, Achtziger R, Blick T, Dorow WHO, 14 | Dziock F, Koehler F, Rabitsch W, Weisser WW (2015) A summary of eight traits 15 | of Coleoptera, Hemiptera, Orthoptera and Araneae, occurring in grasslands 16 | in Germany. Scientific Data. \url{http://dx.doi.org/10.1038/sdata.2015.13}.} 17 | 18 | Additionally, please cite the Dryad data package: 19 | 20 | \itemize{\item Gossner MM, Simons NK, Achtziger R, Blick T, Dorow WHO, Dziock F, Koehler F, 21 | Rabitsch W, Weisser WW (2015) Data from: A summary of eight traits of Coleoptera, 22 | Hemiptera, Orthoptera and Araneae, occurring in grasslands in Germany. 23 | Dryad Digital Repository. \url{http://dx.doi.org/10.5061/dryad.53ds2}.} 24 | } 25 | \usage{ 26 | data(arthropods) 27 | } 28 | \description{ 29 | A summary of eight traits of Coleoptera, Hemiptera, Orthoptera and Araneae, occurring in grasslands in Germany. 30 | } 31 | \details{ 32 | The data set comprises literature trait data of species that were sampled and 33 | measured in a project within the Biodiversity Exploratories which focuses on the effect of land use 34 | on arthropod community composition and related processes in three regions of Germany 35 | } 36 | \section{Measures}{ 37 | 38 | 39 | \itemize{ 40 | \item Order, Suborder, Family, SpeciesID, Genus, Species, Author 41 | \item Body_Size, Dispersal_ability, 42 | \item Feeding_guild, Feeding_guild_short, Feeding_mode, Feeding_specialization, Feeding_tissue, Feeding_plant_part, 43 | \item Endophagous_lifestyle, Stratum_use, Stratum_use_short, Remark, 44 | \item scientificNameStd 45 | } 46 | } 47 | 48 | -------------------------------------------------------------------------------- /man/atlantic_birds.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/traitdata-package.R 3 | \docType{data} 4 | \name{atlantic_birds} 5 | \alias{atlantic_birds} 6 | \title{Database of Atlantic bird morphological traits} 7 | \format{ 8 | A \code{data.frame} with 72483 observations and 83 variables. 9 | } 10 | \source{ 11 | When using this data, please cite the original publication: 12 | \itemize{\item Rodrigues et al. (2019) 13 | "ATLANTIC BIRD TRAITS: a data set of bird morphological traits from the Atlantic forests of South America." 14 | Ecology 100.} 15 | } 16 | \usage{ 17 | data(atlantic_birds) 18 | } 19 | \description{ 20 | Data on morphological traits of Atlantic forest birds 21 | } 22 | \details{ 23 | The data set comprises morphological traits of birds from the Atlantic forests of South America 24 | } 25 | -------------------------------------------------------------------------------- /man/australian_birds.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/traitdata-package.R 3 | \docType{data} 4 | \name{australian_birds} 5 | \alias{australian_birds} 6 | \title{Database of Australian birds} 7 | \format{ 8 | A \code{data.frame} with 2056 observations and 230 variables. 9 | } 10 | \source{ 11 | When using this data, please cite the original publication: 12 | \itemize{\item Garnett et al. (2015) 13 | Biological, ecological, conservation and legal information for all species and subspecies of Australian bird. 14 | Scientific Data.} 15 | } 16 | \usage{ 17 | data(australian_birds) 18 | } 19 | \description{ 20 | Data on Australian bird traits 21 | } 22 | \details{ 23 | The data set comprises biological, ecological, conservation and legal information 24 | for every species and subspecies of Australian birds 25 | } 26 | -------------------------------------------------------------------------------- /man/avonet.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/traitdata-package.R 3 | \docType{data} 4 | \name{avonet} 5 | \alias{avonet} 6 | \title{Morphological, ecological and geographical data for all birds} 7 | \format{ 8 | A \code{data.frame} with 90371 observations and 24 variables. 9 | } 10 | \source{ 11 | When using this data, please cite the original publication: 12 | \itemize{\item Tobias et al. 2021 (Ecology Letters) 13 | AVONET: morphological, ecological and geographical data for all birds.}. 14 | } 15 | \usage{ 16 | data(avonet) 17 | } 18 | \description{ 19 | Morphological, ecological and geographical data for all birds 20 | } 21 | \details{ 22 | The AVONET database contains comprehensive functional trait data for all birds, 23 | including six ecological variables, eleven continuous morphological traits, 24 | and information on range size and location. Raw morphological measurements 25 | are available from 90020 individuals of 11009 extant bird species sampled 26 | from 181 countries. These data are also summarised as species averages in 27 | three taxonomic formats, allowing integration with a global phylogeny, 28 | geographical range maps, IUCN Red List data, and the eBird citizen science 29 | database. Code to reproduce the analyses and figures presented in 30 | Tobias et al 2021 "AVONET: morphological, ecological and geographical 31 | data for all birds" Ecology Letters, is also included. 32 | } 33 | -------------------------------------------------------------------------------- /man/bird_behav.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/traitdata-package.R 3 | \docType{data} 4 | \name{bird_behav} 5 | \alias{bird_behav} 6 | \title{Foraging behaviour and dietary niche of birds} 7 | \format{ 8 | A \code{data.frame} with 9658 observations and 19 variables. 9 | } 10 | \source{ 11 | Cite this dataset as: \itemize{\item Tobias J. A., Pigot, A. L. (2019) 12 | Integrating behaviour and ecology into global biodiversity conservation strategies. Phil. Trans. R. Soc. B, 374, 1781. 13 | \url{http://doi.org/10.1098/rstb.2019.0012}.} 14 | } 15 | \usage{ 16 | data(bird_behav) 17 | } 18 | \description{ 19 | Foraging behaviour and dietary niche of birds 20 | } 21 | \details{ 22 | A dataset for 9658 bird species describing IUCN Red List and Threat category, range size and body mass, 23 | foraging behaviour and diet, ... 24 | } 25 | \section{Measures}{ 26 | 27 | 28 | \itemize{ 29 | \item Genus, Species, Family 30 | \item RedlistCategory, Threat, LogRangeSize, LogBodyMass, Diet, Foraging, Migration, MatingSystem, NestPlacement, Territoriality, Habitat, 31 | IslandDwelling, LogClutchSize, LogNightLights, LogHumanPopulationDensity 32 | \item scientificNameStd 33 | } 34 | } 35 | 36 | -------------------------------------------------------------------------------- /man/carabids.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/traitdata-package.R 3 | \docType{data} 4 | \name{carabids} 5 | \alias{carabids} 6 | \title{Carabid morphological traits} 7 | \format{ 8 | A \code{data.frame} with 121 observations and 12 variables. 9 | } 10 | \source{ 11 | When using this data, please cite the original publication: 12 | 13 | \itemize{ \item van der Plas F, van Klink R, Manning P, Olff H, Fischer M 14 | (2017) Sensitivity of functional diversity metrics to sampling intensity. 15 | Methods in Ecology and Evolution 8(9): 1072-1080. 16 | \url{https://doi.org/10.1111/2041-210x.12728}.} 17 | 18 | Additionally, please cite the Dryad data package: 19 | 20 | \itemize{ \item van der Plas F, van Klink R, Manning P, Olff H, Fischer M 21 | (2017) Data from: Sensitivity of functional diversity metrics to sampling 22 | intensity. Dryad Digital Repository. \url{https://doi.org/10.5061/dryad.1fn46}.} 23 | } 24 | \usage{ 25 | data(carabids) 26 | } 27 | \description{ 28 | Average body measures of 120 Carabid species occuring in the Netherlands. 29 | } 30 | \details{ 31 | Carabid morphological traits. Column names are described below. 32 | } 33 | \section{Measures}{ 34 | 35 | \itemize{ 36 | \item name_correct = species name, 37 | \item source_measurement = researcher who performed measurement, 38 | \item body_length = body length in mm, 39 | \item antenna_length = antenna length in mm, 40 | \item metafemur_length = length metafemur in mm, 41 | \item eyewith_corr = eye width in mm, 42 | \item note = note, 43 | \item resid_femur = residual femur length in mm (i.e. residual from 44 | linear model in which femur length is explained by body length), 45 | \item resid_eye = residual eye length in mm (i.e. residual from linear 46 | model in which eye length is explained by body length), 47 | \item resid_antenna = residual antenna length in mm (i.e. residual 48 | from linear model in which antenna length is explained by body length), 49 | \item scientificNameStd 50 | } 51 | } 52 | 53 | -------------------------------------------------------------------------------- /man/climber.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/traitdata-package.R 3 | \docType{data} 4 | \name{climber} 5 | \alias{climber} 6 | \title{Climatic niche characteristics of European butterflies} 7 | \format{ 8 | A \code{data.frame} with 397 observations and 69 variables. 9 | } 10 | \source{ 11 | Cite this dataset as \itemize{ \item Schweiger O, Harpke A, Wiemers M, Settele J (2014) 12 | CLIMBER: Climatic niche characteristics of the butterflies in Europe. ZooKeys 367:65-84. 13 | \url{http://dx.doi.org/10.3897/zookeys.367.6185}.} 14 | } 15 | \usage{ 16 | data(climber) 17 | } 18 | \description{ 19 | Climatic niche characteristics of the butterflies in Europe 20 | } 21 | \details{ 22 | Detailed information on species' ecological niche characteristics that can be related to declines and 23 | extinctions is indispensable for a better understanding of the relationship between the occurrence and 24 | performance of wild species and their environment and, moreover, for an improved assessment of the impacts of 25 | global change. Knowledge on species characteristics such as habitat requirements is already available in the 26 | ecological literature for butterflies, but information about their climatic requirements is still lacking. Here 27 | we present a unique dataset on the climatic niche characteristics of 397 European butterflies representing 28 | 91% of the European species. These characteristics were obtained by combining detailed information on 29 | butterfly distributions in Europe and the corresponding climatic conditions. The presented dataset comprises information for 30 | the position and breadth of the following climatic niche characteristics: mean annual temperature, range 31 | in annual temperature, growing degree days, annual precipitation sum, range in annual precipitation and 32 | soil water content. The climatic niche position is indicated by the median and mean value for each climate 33 | variable across a species' range, accompanied by the 95% confidence interval for the mean and the number 34 | of grid cells used for calculations. Climatic niche breadth is indicated by the standard deviation and the 35 | minimum and maximum values for each climatic variable across a species' range. Database compilation 36 | was based on high quality standards and the data are ready to use for a broad range of applications. 37 | It is already evident that the information provided in this dataset is of great relevance for basic and applied ecology. 38 | Based on the species temperature index (STI, i.e. the mean temperature value per species), 39 | the community temperature index (CTI, i.e. the average STI value across the species in a community) was 40 | recently adopted as an indicator of climate change impact on biodiversity by the pan-European framework 41 | supporting the Convention on Biological Diversity (Streamlining European Biodiversity Indicators 2010) 42 | and has already been used in several scientific publications. The application potential of this database 43 | ranges from theoretical aspects such as assessments of past niche evolution or analyses of trait interdependencies 44 | to the very applied aspects of measuring, monitoring and projecting historical, ongoing and 45 | potential future responses to climate change using butterflies as an indicator. 46 | } 47 | -------------------------------------------------------------------------------- /man/disperse.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/traitdata-package.R 3 | \docType{data} 4 | \name{disperse} 5 | \alias{disperse} 6 | \title{Dispersal potential of European aquatic macroinvertebrates} 7 | \format{ 8 | A \code{data.frame} with 482 observations and 46 variables. 9 | } 10 | \source{ 11 | Cite this dataset as \itemize{ \item Sarremejane, R., Cid, N., Stubbington, R. et al. 12 | DISPERSE, a trait database to assess the dispersal potential of European aquatic macroinvertebrates. 13 | Sci Data 7, 386 (2020). \url{https://doi.org/10.1038/s41597-020-00732-7}.} 14 | } 15 | \usage{ 16 | data(disperse) 17 | } 18 | \description{ 19 | Dataset on the dispersal potential of European aquatic macroinvertebrates 20 | } 21 | \details{ 22 | This dataset contains information about the dispersal potential of 23 | European aquatic macroinvertebrates 24 | } 25 | \section{Measures}{ 26 | 27 | 28 | \itemize{ 29 | \item Group, Family, Genus, Species, Synonyms 30 | \item Maximum body size (s1 - s7, Ref_s), Life cycle duration (cd1, cd2, Ref_cd), 31 | Potential number of reproductive cycles per year (cy1, cy2, cy3, Ref_cy), 32 | Dispersal strategy (dis1 - dis4, Ref_dis), Adult life span (life1 - life4, Ref_life), 33 | Female wing length (mm) (fwl1 - fwl8, fwl_info, Ref_fwl), 34 | Wing pair type (wnb1 - wnb5, Ref_wnb), 35 | Lifelong fecundity (number of eggs per female) (egg1 - egg4, Ref_egg), 36 | Propensity to drift (drift1, drift2, drift3, Ref_drift) 37 | \item scientificNameStd 38 | } 39 | } 40 | 41 | -------------------------------------------------------------------------------- /man/elton_birds.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/traitdata-package.R 3 | \docType{data} 4 | \name{elton_birds} 5 | \alias{elton_birds} 6 | \title{Foraging attributes of birds} 7 | \format{ 8 | A \code{data.frame} with 9760 observations and 43 variables. 9 | } 10 | \source{ 11 | Cite this dataset as \itemize{ \item Hamish Wilman, Jonathan Belmaker, Jennifer Simpson, 12 | Carolina de la Rosa, Marcelo M. Rivadeneira, and Walter Jetz. (2014). EltonTraits 1.0: Species-level 13 | foraging attributes of the world's birds and mammals. Ecology 95:2027. \url{http://dx.doi.org/10.1890/13-1917.1}.} 14 | } 15 | \usage{ 16 | data(elton_birds) 17 | } 18 | \description{ 19 | Dataset on the foraging attributes of birds 20 | } 21 | \details{ 22 | This csv file contains information about the foraging attributes of 23 | birds from the EltonTraits dataset. 24 | } 25 | \section{Measures}{ 26 | 27 | 28 | \itemize{ 29 | \item SpecID, PassNonPass, Order, Family, BLFamilyEnglish, BLFamSequID, Taxo, Genus, Species, English, 30 | \item Diet.Inv, Diet.Vend, Diet.Vect, Diet.Vfish, Diet.Vunk, Diet.Scav, Diet.Fruit, Diet.Nect, Diet.Seed, 31 | Diet.PlantO, Diet.5Cat, Diet.Source, Diet.Certainty, Diet.EnteredBy, ForStrat.watbelowsurf, ForStrat.wataroundsurf, 32 | ForStrat.ground, ForStrat.understory, ForStrat.midhigh, ForStrat.canopy, ForStrat.aerial, PelagicSpecialist, ForStrat.Source, 33 | ForStrat.SpecLevel, ForStrat.EnteredBy, Nocturnal, BodyMass.Value, BodyMass.Source, BodyMass.SpecLevel, BodyMass.Comment, 34 | Record.Comment, Full.Reference, 35 | \item scientificNameStd 36 | } 37 | } 38 | 39 | -------------------------------------------------------------------------------- /man/elton_mammals.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/traitdata-package.R 3 | \docType{data} 4 | \name{elton_mammals} 5 | \alias{elton_mammals} 6 | \title{Foraging attributes of mammals} 7 | \format{ 8 | A \code{data.frame} with 5400 observations and 29 variables. 9 | } 10 | \source{ 11 | Cite this dataset as \itemize{ \item Hamish Wilman, Jonathan Belmaker, Jennifer Simpson, 12 | Carolina de la Rosa, Marcelo M. Rivadeneira, and Walter Jetz. (2014). EltonTraits 1.0: Species-level 13 | foraging attributes of the world's birds and mammals. Ecology 95:2027. \url{http://dx.doi.org/10.1890/13-1917.1}.} 14 | } 15 | \usage{ 16 | data(elton_mammals) 17 | } 18 | \description{ 19 | Dataset on the foraging attributes of mammals 20 | } 21 | \details{ 22 | This csv file contains information about the foraging attributes of 23 | mammals from the EltonTraits dataset. 24 | } 25 | \section{Measures}{ 26 | 27 | 28 | \itemize{ 29 | \item MSW3_ID, Genus, Species, Family, 30 | \item Diet.Inv, Diet.Vend, Diet.Vect, Diet.Vfish, Diet.Vunk, Diet.Scav, Diet.Fruit, Diet.Nect, Diet.Seed, Diet.PlantO, Diet.Source, 31 | Diet.Certainty, ForStrat.Value, ForStrat.Certainty, ForStrat.Comment, Activity.Nocturnal, Activity.Crepuscular, Activity.Diurnal, 32 | Activity.Source, Activity.Certainty, BodyMass.Value, BodyMass.Source, BodyMass.SpecLevel, Full.Reference, 33 | \item scientificNameStd 34 | } 35 | } 36 | 37 | -------------------------------------------------------------------------------- /man/epiphytes.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/traitdata-package.R 3 | \docType{data} 4 | \name{epiphytes} 5 | \alias{epiphytes} 6 | \title{Vascular epiphytes traits} 7 | \format{ 8 | A \code{data.frame} with 84109 observations and 9 variables. 9 | } 10 | \source{ 11 | Cite this dataset as: \itemize{\item Hietz, P., Wagner, K., Nunes Ramos, F., 12 | Cabral, J. S., Agudelo, C., Benavides, A. M., Cach-Pérez, M. J., Cardelús, C. L., 13 | Chilpa Galván, N., Erickson Nascimento da Costa, L., de Paula Oliveira, R., 14 | Einzmann, H. J. R., de Paiva Farias, R., Guzmán Jacob, V., Kattge, J., 15 | Kessler, M., Kirby, C., Kreft, H., Krömer, T., ... Zotz, G. (2021). 16 | Putting vascular epiphytes on the traits map. Journal of Ecology, 00, 1–19. 17 | \url{https://doi.org/10.1111/1365-2745.13802}.} 18 | 19 | Additionally, please cite the Dryad data package: \itemize{\item Hietz, Peter (2021) 20 | Data from: Putting vascular epiphytes on the traits map. 21 | Dryad Digital Repository. \url{https://doi.org/10.5061/dryad.7wm37pvtf}.} 22 | } 23 | \usage{ 24 | data(epiphytes) 25 | } 26 | \description{ 27 | Vascular epiphytes traits 28 | } 29 | \details{ 30 | A dataset of 76,561 trait observations for 2,882 species of vascular epiphytes. 31 | } 32 | \section{Measures}{ 33 | 34 | 35 | \itemize{ 36 | \item Contributor, siteID, Individual, Genus, Species 37 | \item trait, trait_value, unit 38 | \item scientificNameStd 39 | } 40 | } 41 | 42 | -------------------------------------------------------------------------------- /man/eubirds.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/traitdata-package.R 3 | \docType{data} 4 | \name{eubirds} 5 | \alias{eubirds} 6 | \title{Life-history of European birds} 7 | \format{ 8 | A \code{data.frame} with 499 observations and 85 variables. 9 | } 10 | \source{ 11 | Cite this dataset as: \itemize{\item Storchova L, Horak D (2018) 12 | Life-history characteristics of European birds. Global Ecology and Biogeography, 00, 1-7. 13 | \url{https://doi.org/10.1111/geb.12709}.} 14 | 15 | Additionally, please cite the Dryad data package: \itemize{\item Storchova L, Horak D (2018) 16 | Data from: Life-history characteristics of European birds. 17 | Dryad Digital Repository. \url{https://doi.org/10.5061/dryad.n6k3n}.} 18 | } 19 | \usage{ 20 | data(eubirds) 21 | } 22 | \description{ 23 | Life-history of European birds 24 | } 25 | \details{ 26 | A dataset for 499 bird species breeding in Europe and 34 key life-history traits 27 | represented in 85 variables. As a primary source of information we used the comprehensive 28 | handbook The birds of the Western Palearctic. The traits provide information about 29 | species-specific mean values. We did not record values for different geographical subspecies. 30 | We chose several types of avian traits, such as morphological, reproductive 31 | and behavioural traits, dietary and habitat preferences. 32 | } 33 | \section{Measures}{ 34 | 35 | 36 | \itemize{ 37 | \item ID, Order, Family, Genus, Species, 38 | \item LengthU_MEAN , WingU_MEAN, WingM_MEAN, WingF_MEAN, TailU_MEAN, TailM_MEAN, TailF_MEAN, BillU_MEAN, 39 | BillM_MEAN, BillF_MEAN, TarsusU_MEAN, TarsusM_MEAN, TarsusF_MEAN, WeightU_MEAN, WeightM_MEAN, WeightF_MEAN, 40 | Sexual.dimorphism, Clutch_MIN, Clutch_MAX, Clutch_MEAN, Broods.per.year, EggL_MEAN, EggW_MEAN, Egg_MASS, Young, 41 | Association.during.nesting, Nest.type, Nest.building, Mating.system, Incubation.period, Incubation.sex, 42 | Hatching, Eggshells, Nestling.period, Fledging.period, Parental.feeding, Age.of.independence, Feeding.independence, 43 | Age.of.first.breeding, Life.span, Post.fledging.mortality, Mortality.of.adults, Association.outside.the.breeding.season, 44 | Territoriality, Sedentary, Facultative.migrant, Short.distance.migrant, Long.distance.migrant, Deciduous.forest, 45 | Coniferous.forest, Woodland, Shrub, Savanna, Tundra, Grassland, Mountain.meadows, Reed, Swamps, Desert, Freshwater, 46 | Marine, Rocks, Human.settlements, Folivore_Y, Frugivore_Y, Granivore_Y, Arthropods_Y, Other.invertebrates_Y, Fish_Y, 47 | Other.vertebrates_Y, Carrion_Y, Omnivore_Y, Folivore_B, Frugivore_B, Granivore_B, Arthropods_B, Other.invertebrates_B, 48 | Fish_B, Other.vertebrates_B, Carrion_B, Omnivore_B, Data.source, 49 | \item scientificNameStd 50 | } 51 | } 52 | 53 | -------------------------------------------------------------------------------- /man/fishmorph.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/traitdata-package.R 3 | \docType{data} 4 | \name{fishmorph} 5 | \alias{fishmorph} 6 | \title{Morphological traits of freshwater fishes} 7 | \format{ 8 | A \code{data.frame} with 8342 observations and 19 variables. 9 | } 10 | \source{ 11 | Cite this dataset as: \itemize{\item Brosse, S., Charpin, N., Su, G., 12 | Toussaint, A., Herrera, G., Tedesco, P.A., Villeger, S. (2021) 13 | FISHMORPH: a global database on morphological traits of freshwater fishes. 14 | Global Ecology and Biogeography"", \url{https://doi.org/10.1111/geb.13395}.} 15 | } 16 | \usage{ 17 | data(fishmorph) 18 | } 19 | \description{ 20 | Morphological traits of freshwater fishes 21 | } 22 | \details{ 23 | The database includes ten morphological traits measured on 24 | 10230 freshwater fish species, covering 59.71% of the world freshwater fish fauna. 25 | } 26 | \section{Measures}{ 27 | 28 | \itemize{ 29 | \item Variable name, SpecCode, Superorder, Order, 30 | Family, Genus species, 31 | \item MBI (Maximum body length), BEl (Body elongation), 32 | VEp (Vertical eye position), REs (Relative eye size), 33 | OGp (Oral gape position), RMl (Relative maxillary length), 34 | BLs (Body lateral shape), PFv (Pectoral fin vertical position), 35 | PFs (Pectoral fin size), CPt (Caudal peduncle throttling), 36 | Type of illustration, Reference 37 | \item scientificNameStd 38 | } 39 | } 40 | 41 | -------------------------------------------------------------------------------- /man/get_taxonomy.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/get_taxonomy.R 3 | \name{get_taxonomy} 4 | \alias{get_taxonomy} 5 | \title{Get accepted canonical names and taxonomy for a given species name} 6 | \usage{ 7 | get_taxonomy(x, preferred_data_sources=c(11:15), fuzzy = TRUE, verbose = TRUE) 8 | } 9 | \arguments{ 10 | \item{x}{a character string or vector of species names.} 11 | 12 | \item{preferred_data_sources}{Select the datasources that should be used for name matching, default is GBIF.} 13 | 14 | \item{fuzzy}{logical. If TRUE, function tries fuzzy matching for species requests. 15 | May produce output, if normal matching fails. (not working!)} 16 | 17 | \item{verbose}{logical. If FALSE, warnings and messages are suppressed.} 18 | } 19 | \value{ 20 | a \code{data.frame} mapping the user supplied names to the accepted taxon names and 21 | higher taxonomic information (kingdom, phylum, class, order, family, genus). 22 | } 23 | \description{ 24 | Get accepted canonical names and taxonomy for a given species name 25 | } 26 | \details{ 27 | If 'synonym' is returned as TRUE, the user provided name has been identified as a synonym and was mapped to an accepted name. 28 | The field confidence reports the confidence of the matching procedure performed by the function 'get_gbifid_()' of the package 'taxize'. 29 | The taxonID is a globally valid URI that links to the taxon description of the GBIF backbone taxonomy. 30 | } 31 | \examples{ 32 | \dontrun{ 33 | get_taxonomy(x="Chorthippus albomarginatus") 34 | 35 | get_taxonomy(x=c("Equus burchellii", "Equus quagga")) 36 | 37 | get_taxonomy(x="Aegotheles tatei") 38 | } 39 | } 40 | \references{ 41 | The initial code of this function was obtained from the `traitdataform` package, 42 | which is available on GitHub: \url{https://github.com/EcologicalTraitData/traitdataform}. 43 | } 44 | \author{ 45 | RS-eco 46 | } 47 | -------------------------------------------------------------------------------- /man/globTherm.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/traitdata-package.R 3 | \docType{data} 4 | \name{globTherm} 5 | \alias{globTherm} 6 | \title{Thermal tolerances for aquatic and terrestrial organisms} 7 | \format{ 8 | A \code{data.frame} with 2134 observations and 47 variables. 9 | } 10 | \source{ 11 | Cite this dataset as: \itemize{\item Bennett, J. M. et al. (2018) GlobTherm, a global database on thermal tolerances for 12 | aquatic and terrestrial organisms. Scientific Data. \url{https://doi.org/10.1038/sdata.2018.22}.} 13 | } 14 | \usage{ 15 | data(globTherm) 16 | } 17 | \description{ 18 | A global database on thermal tolerance for aquatic and terrestrial organisms 19 | } 20 | \details{ 21 | How climate affects species distributions is a longstanding question receiving renewed interest owing to the 22 | need to predict the impacts of global warming on biodiversity. Is climate change forcing species to live near 23 | their critical thermal limits? Are these limits likely to change through natural selection? These and other 24 | important questions can be addressed with models relating geographical distributions of species with 25 | climate data, but inferences made with these models are highly contingent on non-climatic factors such as 26 | biotic interactions. Improved understanding of climate change effects on species will require extensive 27 | analysis of thermal physiological traits, but such data are both scarce and scattered. To overcome current 28 | limitations, we created the GlobTherm database. The database contains experimentally derived species' 29 | thermal tolerance data currently comprising over 2000 species of terrestrial, freshwater, intertidal and 30 | marine multicellular algae, plants, fungi, and animals. The GlobTherm database will be maintained and 31 | curated by iDiv with the aim to keep expanding it, and enable further investigations on the effects of 32 | climate on the distribution of life on Earth. 33 | } 34 | -------------------------------------------------------------------------------- /man/globalHWI.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/traitdata-package.R 3 | \docType{data} 4 | \name{globalHWI} 5 | \alias{globalHWI} 6 | \title{Avian hand-wing index data} 7 | \format{ 8 | A \code{data.frame} with 10338 observations and 23 variables. 9 | } 10 | \source{ 11 | Cite this dataset as: \itemize{\item Sheard et al. (2020) Ecological drivers of global 12 | gradients in avian dispersal inferred from wing morphology. Nature Communications.} 13 | } 14 | \usage{ 15 | data(globalHWI) 16 | } 17 | \description{ 18 | A global database on Avian wing morphology 19 | } 20 | \details{ 21 | A global dataset of avian hand-wing index (HWI), 22 | an estimate of wing shape widely adopted as a proxy for dispersal ability in birds 23 | } 24 | -------------------------------------------------------------------------------- /man/heteroptera.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/traitdata-package.R 3 | \docType{data} 4 | \name{heteroptera} 5 | \alias{heteroptera} 6 | \title{Heteroptera morphometry traits} 7 | \format{ 8 | A \code{data.frame} with 179 observations and 20 variables. 9 | } 10 | \source{ 11 | Cite this dataset as: \itemize{\item M. Gossner, Martin; K. Simons, 12 | Nadja; Hoeck, Leonhard; W. Weisser, Wolfgang (2016): Morphometric measures 13 | of Heteroptera sampled in grasslands across three regions of Germany. 14 | \url{https://doi.org/10.6084/m9.figshare.c.3307611.v1}.} 15 | 16 | \url{https://figshare.com/articles/Data_Paper_Data_Paper/3561936}. 17 | } 18 | \usage{ 19 | data(heteroptera) 20 | } 21 | \description{ 22 | Morphometric measures of Heteroptera sampled in grasslands across three 23 | regions of Germany. 24 | } 25 | \details{ 26 | The data sets comprises measured morphometric traits of a total of 179 Heteroptera species that were 27 | sampled by sweep-netting on a total of 150 managed grassland plots across three regions in Germany between 2008 and 2012. 28 | These plots represent the whole range of grassland management intensities from extensively used pastures to mown pastures 29 | to intensively managed and fertilized meadows. In this paper we provide a database of mean values of 23 morphometric measures 30 | across sex and morphotypes for each sampled Heteroptera species. 31 | 32 | Morphological traits are assumed to be related to their adaptation and function in the environment. 33 | Thus the relative morphometric traits can be used as proxies for ecological features of a species 34 | that may affect its performance or fitness. Our database can be used by future trait-based studies 35 | for developing and testing hypotheses of the functional significance of these traits. 36 | 37 | Examples include studying the functional responses of insect communities to environmental drivers or 38 | studying how the change in trait composition affects ecosystem processes. 39 | } 40 | \section{Measures}{ 41 | 42 | 43 | \itemize{ 44 | \item Order, Suborder, Family, SpeciesID, Genus, Species, Author, 45 | \item Body_length, Body_volume, Rel_wing_length, 46 | \item Hind.Femur_shape, Rel_Hind.Femur_length, Rel_Rostrum_length, Front.Femur_shape, 47 | \item Body_shape, Rel_eye_size, Rel_Antenna_length, Schwaebische_Alb, Hainich, Schorfheide.Chorin, 48 | \item scientificNameStd 49 | } 50 | } 51 | 52 | -------------------------------------------------------------------------------- /man/heteropteraRaw.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/traitdata-package.R 3 | \docType{data} 4 | \name{heteropteraRaw} 5 | \alias{heteropteraRaw} 6 | \title{Heteroptera morphometry traits} 7 | \format{ 8 | A \code{data.frame} with 425 observations and 36 variables. 9 | } 10 | \source{ 11 | Cite this dataset as: \itemize{\item M. Gossner, Martin; K. Simons, 12 | Nadja; Hoeck, Leonhard; W. Weisser, Wolfgang (2016): Morphometric measures 13 | of Heteroptera sampled in grasslands across three regions of Germany. 14 | \url{https://doi.org/10.6084/m9.figshare.c.3307611.v1}.} 15 | 16 | \url{https://figshare.com/articles/Data_Paper_Data_Paper/3561936}. 17 | } 18 | \usage{ 19 | data(heteropteraRaw) 20 | } 21 | \description{ 22 | Morphometric measures of Heteroptera sampled in grasslands across three 23 | regions of Germany. 24 | } 25 | \details{ 26 | The data sets comprises measured morphometric traits of a total of 179 Heteroptera species that were 27 | sampled by sweep-netting on a total of 150 managed grassland plots across three regions in Germany between 2008 and 2012. 28 | These plots represent the whole range of grassland management intensities from extensively used pastures to mown pastures 29 | to intensively managed and fertilized meadows. In this paper we provide a database of mean values of 23 morphometric measures 30 | across sex and morphotypes for each sampled Heteroptera species. 31 | Morphological traits are assumed to be related to their adaptation and function in the environment. 32 | Thus the relative morphometric traits can be used as proxies for ecological features of a species 33 | that may affect its performance or fitness. Our database can be used by future trait-based studies 34 | for developing and testing hypotheses of the functional significance of these traits. 35 | Examples include studying the functional responses of insect communities to environmental drivers or 36 | studying how the change in trait composition affects ecosystem processes. 37 | } 38 | \section{Measures}{ 39 | 40 | 41 | \itemize{ 42 | \item Order, Suborder, Family, SpeciesID, Genus, Species, Author, 43 | \item Body_length, Body_volume, Rel_wing_length, 44 | \item Hind.Femur_shape, Rel_Hind.Femur_length, Rel_Rostrum_length, Front.Femur_shape, 45 | \item Body_shape, Rel_eye_size, Rel_Antenna_length, Schwaebische_Alb, Hainich, Schorfheide.Chorin, 46 | \item scientificNameStd 47 | } 48 | } 49 | 50 | -------------------------------------------------------------------------------- /man/lizard_traits.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/traitdata-package.R 3 | \docType{data} 4 | \name{lizard_traits} 5 | \alias{lizard_traits} 6 | \title{Traits of lizards of the world} 7 | \format{ 8 | A \code{data.frame} with 2692 observations and 50 variables. 9 | } 10 | \source{ 11 | Cite this dataset as: \itemize{\item Meiri S. (2018) Traits of lizards of the world: 12 | Variation around a successful evolutionary design. Global Ecol Biogeogr. \url{https://doi.org/10.1111/geb.12773}.} 13 | 14 | Additionally, please cite the Dryad data package: 15 | 16 | \itemize{ \item Meiri, Shai (2019), Data from: Traits of lizards of the world: 17 | variation around a successful evolutionary design, Dryad, Dataset, \url{https://doi.org/10.5061/dryad.f6t39kj}.} 18 | } 19 | \usage{ 20 | data(lizard_traits) 21 | } 22 | \description{ 23 | Geographical, morphological, ecological, physiological and life history traits for lizards of the world. 24 | } 25 | \details{ 26 | The data sets comprises geographical, morphological, ecological, physiological and life history traits of 27 | a total of 6657 known species of lizards. 28 | } 29 | -------------------------------------------------------------------------------- /man/mammal_diet.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/traitdata-package.R 3 | \docType{data} 4 | \name{mammal_diet} 5 | \alias{mammal_diet} 6 | \title{Mammal diet database} 7 | \format{ 8 | A \code{data.frame} with 5374 observations and 31 variables. 9 | } 10 | \source{ 11 | Cite this dataset as: 12 | 13 | \itemize{ \item Kissling, W.D., Dalby, L., Flojgaard, C., Lenoir, J., Sandel, B., 14 | Sandom, C., Trojelsgaard, K., Svenning, J. (2014). Establishing macroecological 15 | trait datasets: digitalization, extrapolation, and validation of diet 16 | preferences in terrestrial mammals worldwide. Ecol Evol, 4, 2913-2930. 17 | \url{http://onlinelibrary.wiley.com/doi/10.1002/ece3.1136/}.} 18 | 19 | Additionally, please cite the Dryad data package: 20 | 21 | \itemize{ \item Kissling WD, Dalby L, Flojgaard C, Lenoir J, 22 | Sandel B, Sandom C, Trojelsgaard K, Svenning J-C (2014) Data from: Establishing macroecological 23 | trait datasets: digitalization, extrapolation, and validation of diet preferences in terrestrial 24 | mammals worldwide. Dryad Digital Repository. \url{https://doi.org/10.5061/dryad.6cd0v}.} 25 | } 26 | \usage{ 27 | data(mammal_diet) 28 | } 29 | \description{ 30 | A comprehensive global dataset of diet preferences of mammals. 31 | Diet information was digitized from the literature and 32 | extrapolated for species with missing information. The original and 33 | extrapolated data cover species-level diet information for >99% of all 34 | terrestrial mammals. 35 | } 36 | \details{ 37 | Ecological trait data are essential for understanding the 38 | broad-scale distribution of biodiversity and its response to global change. 39 | For animals, diet represents a fundamental aspect of species' evolutionary 40 | adaptations, ecological and functional roles, and trophic interactions. 41 | However, the importance of diet for macroevolutionary and macroecological 42 | dynamics remains little explored, partly because of the lack of 43 | comprehensive trait datasets. We compiled and evaluated a comprehensive 44 | global dataset of diet preferences of mammals. Diet 45 | information was digitized from two global and cladewide data sources and 46 | errors of data entry by multiple data recorders were assessed. We then 47 | developed a hierarchical extrapolation procedure to fill-in diet 48 | information for species with missing information. Missing data were 49 | extrapolated with information from other taxonomic levels (genus, other 50 | species within the same genus, or family) and this extrapolation was 51 | subsequently validated both internally (with a jack-knife approach applied 52 | to the compiled species-level diet data) and externally (using independent 53 | species-level diet information from a comprehensive continentwide data 54 | source). Finally, we grouped mammal species into trophic levels and dietary 55 | guilds, and their species richness as well as their proportion of total 56 | richness were mapped at a global scale for those diet categories with good 57 | validation results. The success rate of correctly digitizing data was 94%, 58 | indicating that the consistency in data entry among multiple recorders was 59 | high. Data sources provided species-level diet information for a total of 60 | 2033 species (38% of all 5364 terrestrial mammal species, based on the IUCN 61 | taxonomy). For the remaining 3331 species, diet information was mostly 62 | extrapolated from genus-level diet information (48% of all terrestrial 63 | mammal species), and only rarely from other species within the same genus 64 | (6%) or from family level (8%). Internal and external validation showed 65 | that: (1) extrapolations were most reliable for primary food items; (2) 66 | several diet categories had high proportions of correctly predicted 67 | diet ranks; and (3) the potential of correctly extrapolating specific diet 68 | categories varied both within and among clades. Global maps of species 69 | richness and proportion showed congruence among trophic levels, but also 70 | substantial discrepancies between dietary guilds. MammalDIET provides a 71 | comprehensive, unique and freely available dataset on diet preferences for 72 | all terrestrial mammals worldwide. It enables broad-scale analyses for 73 | specific trophic levels and dietary guilds, and a first assessment of trait 74 | conservatism in mammalian diet preferences at a global scale. The 75 | digitalization, extrapolation and validation procedures could be 76 | transferable to other trait data and taxa. 77 | } 78 | \section{Measures}{ 79 | 80 | 81 | \itemize{ 82 | \item TaxonID, Order, Family, Genus, Species, 83 | \item Animal, Vertebrate, Mammal, Bird, Herptile, Fish, Invertebrate, 84 | \item Plant, Seed, Fruit, Nectar, Root, Leaf, Woody, Herbaceous, Other, 85 | \item TaxonomicNote, FillCode, TrophicLevel, 86 | \item MammalEater, Insectivore, Frugivore, Granivore, Folivore, DataSource, 87 | \item scientificNameStd 88 | } 89 | } 90 | 91 | \author{ 92 | [Kissling, W.D.](danielkissling@web.de), Dalby, L., Flojgaard, C., 93 | Lenoir, J., Sandel, B., Sandom, C., Trojelsgaard, K., Svenning, J. 94 | } 95 | -------------------------------------------------------------------------------- /man/mammal_diet2.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/traitdata-package.R 3 | \docType{data} 4 | \name{mammal_diet2} 5 | \alias{mammal_diet2} 6 | \title{Mammal diet database} 7 | \format{ 8 | A \code{data.frame} with 6625 observations and 31 variables. 9 | } 10 | \source{ 11 | Cite this dataset as: 12 | 13 | \itemize{ \item Gainsbury, Alison M.; Tallowin, Oliver J. S.; Meiri, Shai (2019), 14 | An updated global dataset for diet preferences in terrestrial mammals: testing the validity of extrapolation. 15 | Mammal Review, 48, 160-167. \url{http://doi.org/10.1111/mam.12119}.} 16 | } 17 | \usage{ 18 | data(mammal_diet2) 19 | } 20 | \description{ 21 | Combined mammal dietary dataset from Kissling et al. (2014) and the updated collected dietary information for 1261 mammalian species. 22 | } 23 | \details{ 24 | 1. Diet is a key trait of an organism's life history that influences a broad spectrum of 25 | ecological and evolutionary processes. Kissling et al. (2014) compiled a species-specific 26 | dataset of diet preferences of mammals for 38% of a total of 5364 terrestrial mammalian 27 | species assessed for the International Union for Conservation of Nature's Red List, to 28 | facilitate future studies. The authors imputed dietary data for the remaining 62% by using 29 | extrapolation from phylogenetic relatives. 2. We collected dietary information for 1261 30 | mammalian species for which data were extrapolated by Kissling et al. (2014), in order to 31 | evaluate the success with which such extrapolation can predict true diets. 3. The 32 | extrapolation method devised by Kissling et al. (2014) performed well for broad dietary 33 | categories (consumers of plants and animals). However, the method performed 34 | inconsistently, and sometimes poorly, for finer dietary categories, varying in accuracy in both 35 | dietary categories and mammalian orders. 4. The results of the extrapolation performance 36 | serve as a cautionary tale. Given the large variation in extrapolation performance, we 37 | recommend a more conservative approach for inferring mammalian diets, whereby dietary 38 | extrapolation is implemented only when there is a high degree of phylogenetic conservatism 39 | for dietary traits. Phylogenetic comparative methods can be used to detect and measure 40 | phylogenetic signal in diet. If data for species are needed, then only the broadest feeding 41 | categories should be used. This would ensure a greater level of accuracy and provide a more 42 | robust dataset for further ecological and evolutionary analysis. 43 | } 44 | \author{ 45 | Gainsbury, Alison M., Tallowin, Oliver J. S., Meiri, Shai 46 | } 47 | -------------------------------------------------------------------------------- /man/marsupials.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/traitdata-package.R 3 | \docType{data} 4 | \name{marsupials} 5 | \alias{marsupials} 6 | \title{Life-history trait data of marsupials} 7 | \format{ 8 | A \code{data.frame} with 161 observations and 77 variables. 9 | } 10 | \source{ 11 | Cite this dataset as: \itemize{\item Fisher et al. (2001) 12 | THE ECOLOGICAL BASIS OF LIFE HISTORY VARIATION IN MARSUPIALS. Ecology 82.} 13 | } 14 | \usage{ 15 | data(marsupials) 16 | } 17 | \description{ 18 | Life-history traits of marsupials 19 | } 20 | \details{ 21 | Variation in life history and six candidate ecological variables: type of diet, extent of intraspecific competition, 22 | risk of juvenile mortality, diurnal pattern of activity, arboreality, and rainfall pattern of metatherian mammals 23 | } 24 | -------------------------------------------------------------------------------- /man/migbehav_birds.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/traitdata-package.R 3 | \docType{data} 4 | \name{migbehav_birds} 5 | \alias{migbehav_birds} 6 | \title{Migratory behaviour in birds} 7 | \format{ 8 | A \code{data.frame} with 10596 observations and 31 variables. 9 | } 10 | \source{ 11 | Cite this dataset as: 12 | 13 | \itemize{ \item Eyres, A., Boehning-Gaese, K., Fritz, S.A. (2017). Quantification of climatic niches in birds: 14 | adding temporal dimension. Journal of Avian Biology, 000, 001-015. 15 | \url{https://onlinelibrary.wiley.com/doi/10.1111/jav.01308}.} 16 | 17 | Additionally, please refer to the database description at: 18 | \url{http://dataportal-senckenberg.de/database/metacat/bikf.10058.1/bikf}. 19 | } 20 | \usage{ 21 | data(migbehav_birds) 22 | } 23 | \description{ 24 | Dataset on the timing of bird migrations 25 | } 26 | \details{ 27 | The dataset focuses on seasonal migration, i.e. movements causing an individual 28 | adult bird to be found in different locations over the course of one year, 29 | excluding everyday routine movements (e.g. foraging movements) 30 | and one-way dispersal movements by juveniles (natal dispersal) or adults (Newton 2008). 31 | Types or categories of migratory behaviour and different subcategories were recorded and 32 | classified with the Handbook of the Birds of the World (del Hoyo 1992-2013 and 33 | updates on the Handbook of the Birds of the World Alive website www.hbw.com, 34 | accessed until September 2016). 35 | } 36 | \section{Measures}{ 37 | 38 | 39 | \itemize{ 40 | \item IOC3_1_Order, IOC3_1_Family, Genus, Species 41 | \item Extinct_full, Extinct_partial, Marine_full, Marine_partial, 42 | \item Migr_dir_full, Migr_dir_partial Migr_dir_local 43 | \item Migratory_status: directional migratory: 1609 species, 44 | dispersive migratory: 482 species, nomadic: 102 species, 45 | resident: 8325 species, unknown: 78 species 46 | \item Migratory_status_2: full directional migrant: 531 species, partial directional migrant: 1078 species, 47 | full dispersive migrant: 84 species, partial dispersive migrant: 398 species, full nomad: 33 species, 48 | partial nomad: 69 species, full resident: 7912 species, partial resident: 413 species, unknown: 78 species 49 | \item Migratory_status_3: extinct: 155 species, marine: 247 species, full directional migrant: 526 species, 50 | partial directional migrant: 1019 species, full dispersive migrant: 8 species, partial dispersive migrant: 319 species, 51 | full nomad: 33 species, partial nomad: 68 species, full resident: 7793 species, partial resident: 409 species, 52 | unknown: 19 species 53 | } 54 | } 55 | 56 | \author{ 57 | [Alison Eyres](alison.eyres@senckenberg.de), K. Boehning-Gaese, S.A. Fritz 58 | } 59 | -------------------------------------------------------------------------------- /man/names_nonStd.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/traitdata-package.R 3 | \docType{data} 4 | \name{names_nonStd} 5 | \alias{names_nonStd} 6 | \title{Names of non-standardised species} 7 | \format{ 8 | A \code{data.frame} with 8231 observations and 3 variables 9 | (Genus, Species and scientificName). 10 | } 11 | \usage{ 12 | data(names_nonStd) 13 | } 14 | \description{ 15 | Contains non-standardised names of species, which could not be resolved 16 | by the `get_taxonomy` function. 17 | } 18 | \details{ 19 | This csv file contains all species names which could not be standardised using 20 | the `get_taxonomy` function, as species names were misspelled or old, and for which also no synonym was provided. 21 | These species thus have an NA value for the scientificNameStd column in the respective dataset. 22 | } 23 | -------------------------------------------------------------------------------- /man/pantheria.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/traitdata-package.R 3 | \docType{data} 4 | \name{pantheria} 5 | \alias{pantheria} 6 | \title{PanTHERIA mammal traits} 7 | \format{ 8 | A \code{data.frame} with 5426 observations and 55 variables. 9 | } 10 | \source{ 11 | Cite this dataset as: 12 | 13 | \itemize{ \item E. Jones, Kate; Bielby, Jon; Cardillo, Marcel; A. Fritz, Susanne; 14 | O'Dell, Justin; David L. Orme, C.; Safi, Kamran; Sechrest, Wes; H. Boakes, Elizabeth; Carbone, Chris; Connolly, 15 | Christina; Cutts, Michael J.; Foster, Janine K.; Grenyer, Richard; Habib, Michael; Plaster, Christopher A.; 16 | Price, Samantha A.; Rigby, Elizabeth A.; Rist, Janna; Teacher, Amber; Bininda-Emonds, Olaf R. P.; 17 | Gittleman, John L.; M. Mace, Georgina; Purvis, Andy (2009): PanTHERIA: a species-level database of life history, 18 | ecology, and geography of extant and recently extinct mammals. \url{http://esapubs.org/archive/ecol/E090/184/metadata.htm}.} 19 | } 20 | \usage{ 21 | data(pantheria) 22 | } 23 | \description{ 24 | Here we describe a global species-level data set of key 25 | life-history, ecological and geographical traits of all known extant and 26 | recently extinct mammals (PanTHERIA) developed for a number of 27 | macroecological and macroevolutionary research projects. 28 | } 29 | \details{ 30 | Data were gathered from the literature for 25 types of ecological 31 | and life history information for any extant or recently extinct species 32 | within class Mammalia (100740 data lines): 33 | 34 | 1. Activity Cycle; 2. Age at Eye Opening; 3. Age at First Birth; 4. Average 35 | Lifespan; 5. Body Mass; 6. Diet; 7. Dispersal Age; 8. Adult Limb Length; 9. 36 | Gestation Length; 10. Group Composition & Size; 11. Growth Data; 12. 37 | Habitat Layer; 13. Head-Body Length; 14. Interbirth Interval; 15. Litter 38 | size; 16. Litters Per Year; 17. Maximum Longevity; 18. Metabolic Rate; 19. 39 | Migratory Behaviour; 20. Mortality Data; 21. Population Density; 22. 40 | Ranging Behaviour; 23. Sexual 41 | Maturity Age; 24. Teat Number; and 25. Weaning Age. 42 | 43 | 30 specific variables (see Class IV, Table 1) were extracted from the above 44 | data types for PanTHERIA from a total of 94729 data lines (before error 45 | checking). Additionally, 4 variables were derived from extracted variables 46 | within PanTHERIA and 19 variables were calculated from other spatial data 47 | sources (see Class V, Section C). 48 | 49 | see \url{http://esapubs.org/archive/ecol/E090/184/metadata.htm} for further 50 | information. 51 | } 52 | \section{Measures}{ 53 | 54 | 55 | \itemize{ 56 | \item Order, Family, Genus, Species, Binomial, 57 | \item ActivityCycle, AdultBodyMass_g, AdultForearmLen_mm, AdultHeadBodyLen_mm, AgeatEyeOpening_d, AgeatFirstBirth_d, 58 | BasalMetRate_mLO2hr, BasalMetRateMass_g, DietBreadth, DispersalAge_d, GestationLen_d, HabitatBreadth, HomeRange_km2, 59 | HomeRange_Indiv_km2, InterbirthInterval_d, LitterSize, LittersPerYear, MaxLongevity_m, NeonateBodyMass_g, NeonateHeadBodyLen_mm, 60 | PopulationDensity_n.km2, PopulationGrpSize, SexualMaturityAge_d, SocialGrpSize, TeatNumber, Terrestriality, TrophicLevel, 61 | WeaningAge_d, WeaningBodyMass_g, WeaningHeadBodyLen_mm, References, AdultBodyMass_g_EXT, LittersPerYear_EXT, NeonateBodyMass_g_EXT, 62 | WeaningBodyMass_g_EXT, GR_Area_km2, GR_MaxLat_dd, GR_MinLat_dd, GR_MidRangeLat_dd, GR_MaxLong_dd, GR_MinLong_dd, 63 | GR_MidRangeLong_dd, HuPopDen_Min_n.km2, HuPopDen_Mean_n.km2, HuPopDen_5p_n.km2, HuPopDen_Change, Precip_Mean_mm, 64 | Temp_Mean_01degC, AET_Mean_mm, PET_Mean_mm, 65 | \item scientificNameStd 66 | } 67 | } 68 | 69 | \author{ 70 | Kate E. Jones, Jon Bielby, Marcel Cardillo, Susanne A. Fritz, Justin 71 | O'Dell, C. David L. Orme, Kamran Safi, Wes Sechrest, Elizabeth H. Boakes, 72 | Chris Carbone, Christina Connolly, Michael J. Cutts, Janine K. Foster, 73 | Richard Grenyer, Michael Habib, Christopher A. Plaster, Samantha A. Price, 74 | Elizabeth A. Rigby, Janna Rist, Amber Teacher, Olaf R. P. Bininda-Emonds, 75 | John L. Gittleman, Georgina M. Mace, and Andy Purvis. 76 | } 77 | -------------------------------------------------------------------------------- /man/passerines.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/traitdata-package.R 3 | \docType{data} 4 | \name{passerines} 5 | \alias{passerines} 6 | \title{Passerine morphology} 7 | \format{ 8 | A \code{data.frame} with 2374 observations and 28 variables 9 | } 10 | \source{ 11 | Cite this dataset as: \itemize{ \item E. Ricklefs, Robert (2017): 12 | Passerine morphology: external measurements of approximately one-quarter of passerine 13 | bird species. Ecology, 98:1472. \href{http://doi.org/10.1002/ecy.1783}{10.1002/ecy.1783}.} 14 | 15 | The paper can be accessed, through: \url{http://onlinelibrary.wiley.com/doi/10.1002/ecy.1783/full}. 16 | } 17 | \usage{ 18 | data(passerines) 19 | } 20 | \description{ 21 | External measurements of approximately one-quarter of passerine bird species taken from Ricklefs 2017 22 | } 23 | \details{ 24 | The data set includes eight measurements of the external morphology of 1642 species, 25 | roughly one-quarter of all passerine birds (Aves: Order Passeriformes), from all parts of the world, 26 | characterizing the relative proportions of the wing, tail, legs, and beak. 27 | Specimens were measured opportunistically over the past 40 years in museums in the United States and Europe. 28 | Numbers of individuals measured per species vary from one to dozens in some cases. 29 | Measurements for males and females of sexually size-dimorphic species are presented separately. 30 | The measurements include total length, the lengths of the wing, tail, tarsus, and middle toe, 31 | and the length, breadth, and depth of the beak. Particular attention was paid to obtaining a 32 | broad representation of passerine higher taxa, with special interest in small families and subfamilies of passerines, 33 | as well as species produced by evolutionary radiations of birds in archipelagoes, including the Galapagos, Hawaii, and the Lesser Antilles. 34 | 35 | Geographic distributions are summarized from Edwards's Coded List of Birds of the World. 36 | North American and South American species are particularly well represented in the sample, 37 | as well as species belonging to the families Tyrannidae, Furnariidae, Thamnophilidae, Mimidae, 38 | Sturnidae, Fringillidae, Parulidae, Icteridae, Cardinalidae, and Thraupidae. 39 | 40 | The following measurement techniques, paraphrased from Ricklefs and Travis (1980) were used: 41 | (1) total length was measured with a plastic ruler from the tip of the bill to the tip of tail; 42 | (2) we measured the length of the folded wing, which was flattened along a stiff ruler, 43 | from the wrist to the tip of the longest primary; 44 | (3) length of the tail was measured from the base of the feathers in the center of the tail 45 | to the tip of the longest rectrix. 46 | We used dial calipers to measure (0.1 mm) the lengths of the 47 | (4) tarsus, 48 | (5) middle toe (to the base of the claw), and 49 | (6) culmen from the tip of the upper mandible to its kinetic hinge at the front of the skull, and the 50 | (7) depth and 51 | (8) width of the beak at the kinetic hinge. 52 | #' @section Measures: 53 | 54 | \itemize{ 55 | \item Length, Wing, Tail, Tarsus, Toe, `Bill L`, `Bill W`, `Bill D`, 56 | \item HN, N, NI, HP, E, EI, O, OI, AU, AZ, AI, Sex, 57 | \item Order, Family, Subfamily, Genus, Species, `TIF No.`, `IOC NO.`, 58 | \item scientificNameStd 59 | } 60 | } 61 | \author{ 62 | [Robert E. Ricklefs](ricklefs@umsl.edu) 63 | } 64 | -------------------------------------------------------------------------------- /man/primates.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/traitdata-package.R 3 | \docType{data} 4 | \name{primates} 5 | \alias{primates} 6 | \title{Ecological traits of the world's primates} 7 | \format{ 8 | A \code{data.frame} with 2213 observations and 49 variables. 9 | } 10 | \source{ 11 | Cite this dataset as: \itemize{\item Galan-Acedo et al. (2019) Ecological traits 12 | of the world’s primates. Scientific Data 6.} 13 | } 14 | \usage{ 15 | data(primates) 16 | } 17 | \description{ 18 | Ecological traits of the world's primates 19 | } 20 | \details{ 21 | A database on some important ecological traits of the world’s primates (504 species), 22 | including home range size, locomotion type, diel activity, trophic guild, body mass, habitat type, 23 | current conservation status, population trend, and geographic realm. We compiled this information 24 | through a careful review of 1,216 studies published between 1941 and 2018, resulting 25 | in a comprehensive, easily accessible and user-friendly database. 26 | } 27 | -------------------------------------------------------------------------------- /man/reptile_lifehist.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/traitdata-package.R 3 | \docType{data} 4 | \name{reptile_lifehist} 5 | \alias{reptile_lifehist} 6 | \title{Life-history trait database of European reptile species} 7 | \format{ 8 | A \code{data.frame} with 1223 observations and 40 variables. 9 | } 10 | \source{ 11 | Cite this dataset as: \itemize{\item Grimm A, Ramirez AMP, Moulherat S, Reynaud J, Henle K (2014) 12 | Life-history trait database of European reptile species. Nature Conservation 9:45-67. 13 | \url{https://doi.org/10.3897/natureconservation.9.8908}.} 14 | } 15 | \usage{ 16 | data(reptile_lifehist) 17 | } 18 | \description{ 19 | Life-history traits of European reptile species 20 | } 21 | \details{ 22 | Life-history data are essential for providing answers to a wide range of questions in evolution, ecology, and 23 | conservation biology. While life history data for many species, especially plants, are available online, life 24 | history traits of European reptiles are available only widely scattered in different languages and primarily in printed media. 25 | For this reason, we generated a comprehensive trait database covering all European 26 | reptile species. Data were compiled by searching the peer-reviewed and non-peer-reviewed literature. The 27 | database covers the whole of Europe and neighbouring Asian and African countries. 28 | Traits were categorised under five main headings: Activity / Energy / Habitat; Phenology; Movement; Sexual Maturity; and 29 | Morphometry. To ensure that the data were standardised, we defined trait data categories before we started 30 | compiling data. All entries were checked by at least one other person. The dataset provides a unique source 31 | for meta-analyses and modelling in ecology and conservation biology. 32 | } 33 | -------------------------------------------------------------------------------- /man/standardize_taxonomy.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/standardize_taxonomy.R 3 | \name{standardize_taxonomy} 4 | \alias{standardize_taxonomy} 5 | \title{Standardize scientific names of species} 6 | \source{ 7 | The initial code from this function was obtained from the `traitdataform` package, 8 | which is available on GitHub: \url{https://github.com/EcologicalTraitData/traitdataform}. 9 | } 10 | \usage{ 11 | standardize_taxonomy(x, preferred_data_sources=c(11:15), fuzzy = TRUE, verbose = TRUE, 12 | return=c("kingdom", "phylum", "class", "order", "family", "scientificNameStd")) 13 | } 14 | \arguments{ 15 | \item{x}{a \code{data.frame} containing at least the column scientificName.} 16 | 17 | \item{preferred_data_sources}{Select the datasources that should be used for name matching, default is GBIF.} 18 | 19 | \item{fuzzy}{if set to `FALSE` (default mode), this disables fuzzy matching 20 | if problems with ambiguous species names arise.} 21 | 22 | \item{verbose}{has currently no effect.} 23 | 24 | \item{return}{a character vector containing the informatoin that should be 25 | extracted into the output. Valid entries are the column names returned by 26 | function `get_taxonomy()`. See 'Details'.} 27 | } 28 | \description{ 29 | Adds columns to a traitdata object containing accepted species 30 | names and relates to globally unique taxon identifiers via URI. 31 | } 32 | \details{ 33 | Taxonomic standardisation is an enormous challenge, as 34 | species names constantly change and phylogenetic trees are regularly refined. 35 | 36 | As a consequence, there is not one reference for accepted species names, as it often 37 | depends on the field of research and taxonomic focus. 38 | 39 | For reasons of simplicity and because of its high coverage of taxa, the 40 | function `standardize_taxonomy()` by default uses the GBIF Backbone Taxonomy as its 41 | reference system and resolves all provided species names to the accepted 42 | name according to GBIF (resolving misspellings and synonyms in the 43 | process). 44 | } 45 | \examples{ 46 | \dontrun{ 47 | standardize_taxonomy(x=data.frame(scientificName="Equus burchellii")) 48 | 49 | standardize_taxonomy(x=data.frame(scientificName=c("Equus quagga")), 50 | return=c("kingdom", "phylum", "class", "order", "family", "scientificNameStd")) 51 | } 52 | } 53 | \author{ 54 | RS-eco 55 | } 56 | -------------------------------------------------------------------------------- /man/synonyms.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/traitdata-package.R 3 | \docType{data} 4 | \name{synonyms} 5 | \alias{synonyms} 6 | \title{Synonym names for non-standardised species} 7 | \format{ 8 | A \code{data.frame} with 726 observations and 3 variables 9 | (Genus, Species and Synonym). 10 | } 11 | \usage{ 12 | data(synonyms) 13 | } 14 | \description{ 15 | Contains standardised names for species names, which could not be resolved 16 | by the `get_taxonomy` function. 17 | } 18 | \details{ 19 | This csv file contains all species names which could originally not be standardised using 20 | the `get_taxonomy` function, as species names were misspelled or old, and which were than manually corrected 21 | and checked and standardised again using the `get_taxonomy` function. 22 | } 23 | -------------------------------------------------------------------------------- /man/taxonomyStd.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/traitdata-package.R 3 | \docType{data} 4 | \name{taxonomyStd} 5 | \alias{taxonomyStd} 6 | \title{Standardised species names} 7 | \format{ 8 | A \code{data.frame} with 35052 observations and 9 variables. 9 | } 10 | \usage{ 11 | data(taxonomyStd) 12 | } 13 | \description{ 14 | Genus and species of all names contained within the dataset and their standardised scientific Name. 15 | } 16 | \details{ 17 | This csv file contains the genus and species of all species included in any of the datasets and 18 | their derived standardised scientific Name. 19 | } 20 | \section{Measures}{ 21 | 22 | 23 | \itemize{ 24 | \item scientificName, 25 | \item Genus, 26 | \item Species, 27 | \item kingdom, phylum, order, class, family, 28 | \item scientificNameStd 29 | } 30 | } 31 | 32 | -------------------------------------------------------------------------------- /man/tetra_density.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/traitdata-package.R 3 | \docType{data} 4 | \name{tetra_density} 5 | \alias{tetra_density} 6 | \title{Population density estimates in terrestrial vertebrates} 7 | \format{ 8 | A \code{data.frame} with 18246 observations and 22 variables. 9 | } 10 | \source{ 11 | Cite this dataset as: \itemize{\item Santini L., Isaac, N. J. B., Ficetola, G. F. (2018) 12 | TetraDENSITY: A database of population density estimates in terrestrial vertebrates. Global Ecology and Biogeography, 27(7), 787-791. 13 | \url{https://doi.org/10.1111/geb.12756}.} 14 | } 15 | \usage{ 16 | data(tetra_density) 17 | } 18 | \description{ 19 | Population density estimates in terrestrial vertebrates 20 | } 21 | \details{ 22 | A dataset for 2101 tetrapod species describing its population density at 1 degree from 1926 to 2017. 23 | } 24 | \section{Measures}{ 25 | 26 | 27 | \itemize{ 28 | \item Class, Order, Family, Genus, Species, Subspecies 29 | \item Longitude, Latitude, Locality, Country, Year, Season/Month, Habitat, Sampling_Area, Sampling_Area_unit 30 | \item Density, Density_unit, Sampling_Method, Method_info, Notes, Ref_N 31 | \item scientificNameStd 32 | } 33 | } 34 | 35 | -------------------------------------------------------------------------------- /man/trait_glossary.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/traitdata-package.R 3 | \docType{data} 4 | \name{trait_glossary} 5 | \alias{trait_glossary} 6 | \title{Trait glossary} 7 | \format{ 8 | A \code{data.frame} with 354 observations and 8 variables. 9 | } 10 | \usage{ 11 | data(trait_glossary) 12 | } 13 | \description{ 14 | Overview of the different trait variables contained in the trait datasets 15 | } 16 | \details{ 17 | This csv file contains information about all trait variables 18 | contained within this package. 19 | } 20 | \section{Measures}{ 21 | 22 | 23 | \itemize{ 24 | \item datasetName 25 | \item columnName 26 | \item valueType 27 | \item Classes 28 | \item Unit 29 | \item Description 30 | \item Comment 31 | \item Reference 32 | } 33 | } 34 | 35 | -------------------------------------------------------------------------------- /man/traitdata.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/traitdata-package.R 3 | \docType{package} 4 | \name{traitdata} 5 | \alias{traitdata} 6 | \title{traitdata: Easy access to various animal trait data} 7 | \description{ 8 | R package to access 32 different trait datasets covering numerous taxa. 9 | } 10 | \details{ 11 | traitdata provides an easy way to access 32 publicly available trait datasets 12 | (Amniota, Amphibian life-history traits, AmphiBio, Arthropods, Bird behaviour, Carabids, CLIMBER, EltonTraits, 13 | Eubirds, Heteroptera, Lizard traits, mammal_diet, mammal_diet2, Migratory behaviour of birds, PanTHERIA, 14 | Passerines, life history traits of reptiles and TetraDensity), 15 | which contain information on numerous taxonomic groups. 16 | 17 | It has three main utilities: 18 | 19 | \itemize{ 20 | \item Easy access to various trait datasets 21 | \item Standardised taxonomic information for all data records, based on species level only 22 | \item Standardised glossary of all datasets 23 | \item Simple joining of multiple data sources based on their standardised taxonomic information 24 | } 25 | 26 | To learn more about traitdata, start with the \code{vignette("access-data")} vignette. 27 | } 28 | \author{ 29 | RS-eco 30 | } 31 | \keyword{package} 32 | -------------------------------------------------------------------------------- /traitdata.Rproj: -------------------------------------------------------------------------------- 1 | Version: 1.0 2 | 3 | RestoreWorkspace: Default 4 | SaveWorkspace: Default 5 | AlwaysSaveHistory: Default 6 | 7 | EnableCodeIndexing: Yes 8 | UseSpacesForTab: Yes 9 | NumSpacesForTab: 2 10 | Encoding: UTF-8 11 | 12 | RnwWeave: Sweave 13 | LaTeX: pdfLaTeX 14 | 15 | BuildType: Package 16 | PackageUseDevtools: Yes 17 | PackageInstallArgs: --no-multiarch --with-keep.source 18 | PackageRoxygenize: rd,collate,namespace,vignette 19 | -------------------------------------------------------------------------------- /vignettes/access-data.R: -------------------------------------------------------------------------------- 1 | ## ----setup, include=FALSE----------------------------------------------------- 2 | knitr::opts_chunk$set(collapse = TRUE, comment = "#>") 3 | 4 | ## ---- message=FALSE----------------------------------------------------------- 5 | library(traitdata) 6 | library(dplyr, quiet=TRUE) 7 | library(ggplot2) 8 | 9 | ## ----------------------------------------------------------------------------- 10 | data(passerines) 11 | 12 | ## ----------------------------------------------------------------------------- 13 | class(passerines) 14 | head(passerines) 15 | 16 | ## ----------------------------------------------------------------------------- 17 | data(passerines) 18 | select(passerines, Genus, Species, Wing) %>% head() 19 | 20 | ## ----------------------------------------------------------------------------- 21 | passerines %>% select(scientificNameStd, Genus, Species, Family, Wing) %>% 22 | filter(Family == "Cardinalidae") %>% head() 23 | 24 | ## ----------------------------------------------------------------------------- 25 | passerines %>% select(scientificNameStd, Genus, Species, Family, Wing) %>% 26 | arrange(Family) %>% head() 27 | 28 | ## ----------------------------------------------------------------------------- 29 | passerines %>% select(scientificNameStd, Family, Genus, Species) %>% group_by(Family) %>% 30 | summarise(n_family = n()) 31 | 32 | ## ----------------------------------------------------------------------------- 33 | # Get passerine data 34 | data(passerines) 35 | 36 | # Run queries on data 37 | passerines %>% filter(Sex == 1) %>% 38 | select(`Bill L`, `Bill W`, `Bill D`) %>% 39 | arrange(`Bill L`) %>% head() 40 | 41 | ## ----------------------------------------------------------------------------- 42 | by_family <- group_by(passerines, Family) 43 | count <- summarise(by_family, n = n_distinct(scientificNameStd)) 44 | count <- filter(count, n > 10) 45 | count 46 | 47 | ## ----------------------------------------------------------------------------- 48 | passerines %>% group_by(Family) %>% summarize(n=n_distinct(scientificNameStd)) %>% 49 | arrange(desc(n)) %>% head(10) 50 | 51 | ## ----fig.width=6, fig.height=4------------------------------------------------ 52 | passerines %>% group_by(Family) %>% tidyr::drop_na(Family) %>% 53 | summarize(n=n_distinct(scientificNameStd)) %>% 54 | arrange(desc(n)) %>% head(15) %>% collect() %>% ggplot(aes(x=Family, y=n)) + 55 | geom_bar(stat='identity',color='skyblue',fill='#b35900') + xlab("") + 56 | ggtitle('Top ten families with highest number of species') + coord_flip() + ylab('Total number of species') 57 | 58 | ## ----------------------------------------------------------------------------- 59 | #Get passerines data 60 | data(passerines) 61 | 62 | #Get mean wing length and sample size per species and sex 63 | passerines %>% group_by(scientificNameStd, Sex) %>% filter(Sex %in% c(1,2)) %>% 64 | summarise(wing_length = mean(Wing), 65 | sample_size = n()) %>% head(5) 66 | 67 | ## ----fig.width=6, fig.height=4------------------------------------------------ 68 | passerines %>% group_by(scientificNameStd, Sex) %>% filter(Sex %in% c(1,2)) %>% 69 | head(15) %>% collect() %>% ggplot(aes(x=as.factor(`scientificNameStd`), y=Wing, fill=Sex)) + geom_boxplot() + coord_flip() + 70 | xlab("") + ylab("Wing length") 71 | 72 | ## ----------------------------------------------------------------------------- 73 | migbehav_passerines <- inner_join(passerines, migbehav_birds, by="scientificNameStd", copy = TRUE) 74 | 75 | ## ----------------------------------------------------------------------------- 76 | migbehav_passerines %>% arrange(desc(`Bill L`)) %>% select(scientificNameStd, `Bill L`, Migratory_status) %>% unique() %>% head(10) 77 | 78 | ## ----------------------------------------------------------------------------- 79 | data(elton_birds); data(elton_mammals) 80 | eltontraits <- full_join(elton_mammals, elton_birds) 81 | eltontraits %>% select(scientificNameStd, BodyMass.Value) %>% 82 | arrange(desc(BodyMass.Value)) %>% head(10) 83 | 84 | -------------------------------------------------------------------------------- /vignettes/access-data.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "How to access data from traitdata" 3 | author: "RS-eco" 4 | date: "`r Sys.Date()`" 5 | output: rmarkdown::html_vignette 6 | vignette: > 7 | %\VignetteIndexEntry{How to access data from traitdata} 8 | %\VignetteEngine{knitr::rmarkdown} 9 | %\VignetteEncoding{UTF-8} 10 | --- 11 | 12 | ```{r setup, include=FALSE} 13 | knitr::opts_chunk$set(collapse = TRUE, comment = "#>") 14 | ``` 15 | 16 | ## Getting started 17 | 18 | Load the traitdata, dplyr and ggplot2 library 19 | 20 | ```{r, message=FALSE} 21 | library(traitdata) 22 | library(dplyr, quiet=TRUE) 23 | library(ggplot2) 24 | ``` 25 | 26 | ## Data query 27 | 28 | To connect to a table within our database, we use the `data()` function. 29 | 30 | ```{r} 31 | data(passerines) 32 | ``` 33 | 34 | Now we can use standard R calls to have a look at the table. 35 | Here, we check the class and first 6 rows of the table: 36 | 37 | ```{r} 38 | class(passerines) 39 | head(passerines) 40 | ``` 41 | 42 | ## Basic verbs 43 | 44 | Select certain columns, here: Genus, Species and Winglength 45 | 46 | ```{r} 47 | data(passerines) 48 | select(passerines, Genus, Species, Wing) %>% head() 49 | ``` 50 | 51 | Only get bird species from the Auk family 52 | 53 | **Note:** Only passerines has a column named Family. elton_birds and elton_mammals also contain information on Family, but the specific column has a different name. 54 | 55 | ```{r} 56 | passerines %>% select(scientificNameStd, Genus, Species, Family, Wing) %>% 57 | filter(Family == "Cardinalidae") %>% head() 58 | ``` 59 | 60 | Order the data according to certain variables, here by Family 61 | 62 | ```{r} 63 | passerines %>% select(scientificNameStd, Genus, Species, Family, Wing) %>% 64 | arrange(Family) %>% head() 65 | ``` 66 | 67 | Summarise the number of entries (not number of species) for each family (as some species might have multiple records). 68 | 69 | ```{r} 70 | passerines %>% select(scientificNameStd, Family, Genus, Species) %>% group_by(Family) %>% 71 | summarise(n_family = n()) 72 | ``` 73 | 74 | We select only male animals, extract their Bill length, width and depth and arrange the data according to bill length. 75 | 76 | ```{r} 77 | # Get passerine data 78 | data(passerines) 79 | 80 | # Run queries on data 81 | passerines %>% filter(Sex == 1) %>% 82 | select(`Bill L`, `Bill W`, `Bill D`) %>% 83 | arrange(`Bill L`) %>% head() 84 | ``` 85 | 86 | ## Grouping 87 | 88 | This query groups all the taxa by Family, counts the number of Species per Family and 89 | removes all Families that have less than 10 species. 90 | 91 | **Note:** With `n_distinct` we now get the actual number of species, not counting duplicate entries of one species. 92 | 93 | ```{r} 94 | by_family <- group_by(passerines, Family) 95 | count <- summarise(by_family, n = n_distinct(scientificNameStd)) 96 | count <- filter(count, n > 10) 97 | count 98 | ``` 99 | 100 | We can pipe dplyr operations together with %>% from the magrittr R package. 101 | The pipeline %>% takes the output from the left-hand side of the pipe as the first argument 102 | to the function on the right hand side. 103 | 104 | ```{r} 105 | passerines %>% group_by(Family) %>% summarize(n=n_distinct(scientificNameStd)) %>% 106 | arrange(desc(n)) %>% head(10) 107 | ``` 108 | 109 | We can also plot this 110 | 111 | ```{r fig.width=6, fig.height=4} 112 | passerines %>% group_by(Family) %>% tidyr::drop_na(Family) %>% 113 | summarize(n=n_distinct(scientificNameStd)) %>% 114 | arrange(desc(n)) %>% head(15) %>% collect() %>% ggplot(aes(x=Family, y=n)) + 115 | geom_bar(stat='identity',color='skyblue',fill='#b35900') + xlab("") + 116 | ggtitle('Top ten families with highest number of species') + coord_flip() + ylab('Total number of species') 117 | ``` 118 | 119 | ### Wing length and kipp distance for females and males 120 | 121 | Get mean wing length, kipp distance and sample size per species and sex 122 | 123 | ```{r} 124 | #Get passerines data 125 | data(passerines) 126 | 127 | #Get mean wing length and sample size per species and sex 128 | passerines %>% group_by(scientificNameStd, Sex) %>% filter(Sex %in% c(1,2)) %>% 129 | summarise(wing_length = mean(Wing), 130 | sample_size = n()) %>% head(5) 131 | ``` 132 | 133 | Now we want to plot a boxplot of wing length 134 | 135 | ```{r fig.width=6, fig.height=4} 136 | passerines %>% group_by(scientificNameStd, Sex) %>% filter(Sex %in% c(1,2)) %>% 137 | head(15) %>% collect() %>% ggplot(aes(x=as.factor(`scientificNameStd`), y=Wing, fill=Sex)) + geom_boxplot() + coord_flip() + 138 | xlab("") + ylab("Wing length") 139 | ``` 140 | 141 | ## Joins 142 | 143 | Let's join passerines and migbehav_birds by scientificNameStd, only retaining species for which both datasets have entries. 144 | 145 | ```{r} 146 | migbehav_passerines <- inner_join(passerines, migbehav_birds, by="scientificNameStd", copy = TRUE) 147 | ``` 148 | 149 | **Note:** You need to be careful when merging datasets, as some datasets have unique values for one species, 150 | while other datasets have multiple records for one species. I also haven't cross-checked if data entries occur multiple times in different datasets. Please also have a look at the glossary before merging multiple datasets, as some datasets contain variables with the same names. 151 | 152 | Now, we can identify the ten bird species with the longest bill length in our dataset and check their migratory status 153 | 154 | ```{r} 155 | migbehav_passerines %>% arrange(desc(`Bill L`)) %>% select(scientificNameStd, `Bill L`, Migratory_status) %>% unique() %>% head(10) 156 | ``` 157 | 158 | Alternatively, we might want to join datasets, which contain the same variables. 159 | For example, we want to get the Body mass of all species from elton_birds and elton_mammals. 160 | 161 | ```{r} 162 | data(elton_birds); data(elton_mammals) 163 | eltontraits <- full_join(elton_mammals, elton_birds) 164 | eltontraits %>% select(scientificNameStd, BodyMass.Value) %>% 165 | arrange(desc(BodyMass.Value)) %>% head(10) 166 | ``` 167 | 168 | Now, you should be able to work with subsets or aggregates of the data that you are interested in. 169 | -------------------------------------------------------------------------------- /vignettes/data_info.R: -------------------------------------------------------------------------------- 1 | ## ----setup, include=FALSE----------------------------------------------------- 2 | knitr::opts_chunk$set(collapse = TRUE, comment = "#>") 3 | 4 | ## ---- results="asis", echo=F-------------------------------------------------- 5 | table <- " 6 | amniota | traitDatabase | Myrhvold et al. 2016 | [10.1890/15-0846R.1](http://doi.org/10.1890/15-0846R.1) 7 | amphi_lifehist | traitDatabase | Trochet et al. 2014 | [10.3897/BDJ.2.e4123](http://doi.org/10.3897/BDJ.2.e4123) 8 | amphibio | traitDatabase | Oliveira et al. 2017 | [10.1038/sdata.2017.123](http://doi.org/10.1038/sdata.2017.123) 9 | an_age | traitDatabase | Tacutu et al. 2018 | [10.1093/nar/gkx1042](http://doi.org/10.1093/nar/gkx1042) 10 | anuran_morpho | traitDatabase | Mendoza-Henao et al. 2019 | [10.1002/ecy.2685](http://doi.org/10.1002/ecy.2685) 11 | arthropods | traitDatabase | Gossner et al. 2015 | [10.1038/sdata.2015.13](http://doi.org/10.1038/sdata.2015.13) 12 | atlantic_birds | traitDatabase | Rodrigues et al. 2019 | [10.1002/ecy.2647](https://doi.org/10.1002/ecy.2647) 13 | australian_birds | traitDatabase | Garnett et al. 2015 | [10.1038/sdata.2015.61](https://doi.org/10.1038/sdata.2015.61) 14 | AvianBodySize | traitDatabase | Lislevand et al. 2007 | [10.1890/06-2054](https://doi.org/10.1890/06-2054) 15 | bird_behav | traitDatabase | Tobias & Pigot 2019 | [10.1098/rstb.2019.0012](http://dx.doi.org/10.1098/rstb.2019.0012) 16 | carabids | traitDatabase | van der Plas et al. 2017 | [10.5061/dryad.53ds2](http://doi.org/10.5061/dryad.53ds2) 17 | climber | traitDatabase | Schweiger et al. 2014 | [10.3897/zookeys.367.6185](http://doi.org/10.3897/zookeys.367.6185) 18 | disperse | traitDatabase | Sarremejane et al. 2020 | [10.1038/s41597-020-00732-7](http://doi.org/10.1038/s41597-020-00732-7) 19 | elton_birds | traitDatabase | Wilman et al. 2014 | [10.1890/13-1917.1](http://doi.org/10.1890/13-1917.1) 20 | elton_mammals | traitDatabase | Wilman et al. 2014 | [10.1890/13-1917.1](http://doi.org/10.1890/13-1917.1) 21 | epiphytes | traitDatabase | Hietz et al. 2021 | [10.1111/1365-2745.13802](https://doi.org/10.1111/1365-2745.13802) 22 | eubirds | traitDatabase | Storchová & Hořák 2017 | [10.1111/geb.12709](https://doi.org/10.1111/geb.12709) 23 | fishmorph | traitDatabase | Brosse et al. 2021 | [10.1111/geb.13395](https://doi.org/10.1111/geb.13395) 24 | globalHWI | traitDatabase | Sheard et al. 2020 | [10.1038/s41467-020-16313-6](http://doi.org/10.1038/s41467-020-16313-6) 25 | globTherm | traitDatabase | Bennett et al. 2018 | [10.1038/sdata.2018.22](https://doi.org/10.1038/sdata.2018.22) 26 | heteroptera | traitDatabase | Gossner et al. 2016 | [10.6084/m9.figshare.c.3307611.v1](https://doi.org/10.6084/m9.figshare.c.3307611.v1) 27 | heteropteraRaw | traitDatabase | Gossner et al. 2016 | [10.6084/m9.figshare.c.3307611.v1](https://doi.org/10.6084/m9.figshare.c.3307611.v1) 28 | lizard_traits | traitDatabase | Meiri 2018 | [10.1111/geb.12773](http://doi.org/10.1111/geb.12773) 29 | mammal_diet | traitDatabase | Kissling et al. 2014 | [10.1002/ece3.1136](http://doi.org/10.1002/ece3.1136) 30 | mammal_diet2 | traitDatabase | Gainsbury et al. 2018 | [10.1111/mam.12119](http://doi.org/10.1111/mam.12119) 31 | 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) 32 | migbehav_birds | literatureData | Eyres & Fritz | [10.12761/SGN.2017.10058](http://doi.org/10.12761/SGN.2017.10058) 33 | pantheria | traitDatabase | Jones et al. 2009 | [10.1890/08-1494.1](http://doi.org/10.1890/08-1494.1) 34 | passerines | traitDatabase | Ricklefs 2017 | [10.1002/ecy.1783](http://doi.org/10.1002/ecy.1783) 35 | primates | traitDatabase | Galán-Acedo et al. 2020 | [10.1038/s41597-019-0059-9](http://doi.org/10.1038/s41597-019-0059-9) 36 | reptile_lifehist | traitDatabase | Grimm et al. 2014 | [10.3897/natureconservation.9.8908](http://doi.org/10.3897/natureconservation.9.8908) 37 | tetra_density | traitDatabase | Santini et al. 2018 | [10.1111/geb.12756](https://doi.org/10.1111/geb.12756) 38 | " 39 | df <- read.delim(textConnection(table),header=FALSE,sep="|",strip.white=TRUE,stringsAsFactors=FALSE) 40 | names(df) <- unname(as.list(df[1,])) # put headers on 41 | df <- df[-1,] # remove first row 42 | row.names(df)<-NULL 43 | knitr::kable(df, style="rmarkdown") 44 | 45 | -------------------------------------------------------------------------------- /vignettes/data_info.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Introduction to traitdata" 3 | author: "RS-eco" 4 | date: "`r Sys.Date()`" 5 | output: rmarkdown::html_vignette 6 | vignette: > 7 | %\VignetteIndexEntry{Introduction to traitdata} 8 | %\VignetteEngine{knitr::rmarkdown} 9 | %\VignetteEncoding{UTF-8} 10 | --- 11 | 12 | ```{r setup, include=FALSE} 13 | knitr::opts_chunk$set(collapse = TRUE, comment = "#>") 14 | ``` 15 | 16 | ## Taxonomy 17 | 18 | ## Datasets 19 | 20 | There are 32 different datasets, which are currently included in this package: 21 | 22 | ```{r, results="asis", echo=F} 23 | table <- " 24 | amniota | traitDatabase | Myrhvold et al. 2016 | [10.1890/15-0846R.1](http://doi.org/10.1890/15-0846R.1) 25 | amphi_lifehist | traitDatabase | Trochet et al. 2014 | [10.3897/BDJ.2.e4123](http://doi.org/10.3897/BDJ.2.e4123) 26 | amphibio | traitDatabase | Oliveira et al. 2017 | [10.1038/sdata.2017.123](http://doi.org/10.1038/sdata.2017.123) 27 | an_age | traitDatabase | Tacutu et al. 2018 | [10.1093/nar/gkx1042](http://doi.org/10.1093/nar/gkx1042) 28 | anuran_morpho | traitDatabase | Mendoza-Henao et al. 2019 | [10.1002/ecy.2685](http://doi.org/10.1002/ecy.2685) 29 | arthropods | traitDatabase | Gossner et al. 2015 | [10.1038/sdata.2015.13](http://doi.org/10.1038/sdata.2015.13) 30 | atlantic_birds | traitDatabase | Rodrigues et al. 2019 | [10.1002/ecy.2647](https://doi.org/10.1002/ecy.2647) 31 | australian_birds | traitDatabase | Garnett et al. 2015 | [10.1038/sdata.2015.61](https://doi.org/10.1038/sdata.2015.61) 32 | AvianBodySize | traitDatabase | Lislevand et al. 2007 | [10.1890/06-2054](https://doi.org/10.1890/06-2054) 33 | bird_behav | traitDatabase | Tobias & Pigot 2019 | [10.1098/rstb.2019.0012](http://dx.doi.org/10.1098/rstb.2019.0012) 34 | carabids | traitDatabase | van der Plas et al. 2017 | [10.5061/dryad.53ds2](http://doi.org/10.5061/dryad.53ds2) 35 | climber | traitDatabase | Schweiger et al. 2014 | [10.3897/zookeys.367.6185](http://doi.org/10.3897/zookeys.367.6185) 36 | disperse | traitDatabase | Sarremejane et al. 2020 | [10.1038/s41597-020-00732-7](http://doi.org/10.1038/s41597-020-00732-7) 37 | elton_birds | traitDatabase | Wilman et al. 2014 | [10.1890/13-1917.1](http://doi.org/10.1890/13-1917.1) 38 | elton_mammals | traitDatabase | Wilman et al. 2014 | [10.1890/13-1917.1](http://doi.org/10.1890/13-1917.1) 39 | epiphytes | traitDatabase | Hietz et al. 2021 | [10.1111/1365-2745.13802](https://doi.org/10.1111/1365-2745.13802) 40 | eubirds | traitDatabase | Storchová & Hořák 2017 | [10.1111/geb.12709](https://doi.org/10.1111/geb.12709) 41 | fishmorph | traitDatabase | Brosse et al. 2021 | [10.1111/geb.13395](https://doi.org/10.1111/geb.13395) 42 | globalHWI | traitDatabase | Sheard et al. 2020 | [10.1038/s41467-020-16313-6](http://doi.org/10.1038/s41467-020-16313-6) 43 | globTherm | traitDatabase | Bennett et al. 2018 | [10.1038/sdata.2018.22](https://doi.org/10.1038/sdata.2018.22) 44 | heteroptera | traitDatabase | Gossner et al. 2016 | [10.6084/m9.figshare.c.3307611.v1](https://doi.org/10.6084/m9.figshare.c.3307611.v1) 45 | heteropteraRaw | traitDatabase | Gossner et al. 2016 | [10.6084/m9.figshare.c.3307611.v1](https://doi.org/10.6084/m9.figshare.c.3307611.v1) 46 | lizard_traits | traitDatabase | Meiri 2018 | [10.1111/geb.12773](http://doi.org/10.1111/geb.12773) 47 | mammal_diet | traitDatabase | Kissling et al. 2014 | [10.1002/ece3.1136](http://doi.org/10.1002/ece3.1136) 48 | mammal_diet2 | traitDatabase | Gainsbury et al. 2018 | [10.1111/mam.12119](http://doi.org/10.1111/mam.12119) 49 | 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) 50 | migbehav_birds | literatureData | Eyres & Fritz | [10.12761/SGN.2017.10058](http://doi.org/10.12761/SGN.2017.10058) 51 | pantheria | traitDatabase | Jones et al. 2009 | [10.1890/08-1494.1](http://doi.org/10.1890/08-1494.1) 52 | passerines | traitDatabase | Ricklefs 2017 | [10.1002/ecy.1783](http://doi.org/10.1002/ecy.1783) 53 | primates | traitDatabase | Galán-Acedo et al. 2020 | [10.1038/s41597-019-0059-9](http://doi.org/10.1038/s41597-019-0059-9) 54 | reptile_lifehist | traitDatabase | Grimm et al. 2014 | [10.3897/natureconservation.9.8908](http://doi.org/10.3897/natureconservation.9.8908) 55 | tetra_density | traitDatabase | Santini et al. 2018 | [10.1111/geb.12756](https://doi.org/10.1111/geb.12756) 56 | " 57 | df <- read.delim(textConnection(table),header=FALSE,sep="|",strip.white=TRUE,stringsAsFactors=FALSE) 58 | names(df) <- unname(as.list(df[1,])) # put headers on 59 | df <- df[-1,] # remove first row 60 | row.names(df)<-NULL 61 | knitr::kable(df, style="rmarkdown") 62 | ``` 63 | 64 | * 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. 65 | * 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. 66 | 67 | ### amniota 68 | 69 | An amniote life-history database to perform comparative analyses with birds, mammals, and reptiles. 70 | 71 | ### amphi_lifehist 72 | 73 | A database of life-history traits of European amphibians 74 | 75 | ### AmphiBio 76 | 77 | A comprehensive database of natural history traits for amphibians worldwide. 78 | 79 | ### AnAge 80 | 81 | Database of Animal Ageing and Longevity 82 | 83 | ### arthropods 84 | 85 | Literature trait data (8 traits) of Coleoptera, Hemiptera, Orthoptera and Araneae species, that were sampled and measured in a project within the Biodiversity Exploratories which focuses on the effect of land use on arthropod community composition and related processes (e.g. species interactions such as herbivory or predation) in three regions of Germany. 86 | 87 | ### bird_behav 88 | 89 | Foraging behaviour and dietary niche of birds 90 | 91 | ### carabids 92 | 93 | Average body measures of 120 Carabid species occuring in the Netherlands. 94 | 95 | ### climber 96 | 97 | Climatic niche characteristics of European butterflies 98 | 99 | ### elton_birds 100 | 101 | Species-level foraging attributes of the world's birds from EltonTraits. 102 | 103 | ### elton_mammals 104 | 105 | Species-level foraging attributes of the world's mammals from EltonTraits. 106 | 107 | ### eubirds 108 | 109 | Life-history of European birds 110 | 111 | ### heteroptera & heteropteraRaw 112 | 113 | Morphometric measures of Heteroptera sampled in grasslands across three regions of Germany. 114 | 115 | ### lizard_traits 116 | 117 | Traits of lizards of the world 118 | 119 | ### mammal_diet 120 | 121 | A comprehensive global dataset of diet preferences of mammals (‘MammalDIET’). Diet information was digitized from the literature and extrapolated for species with missing information. The original and extrapolated data cover species-level diet information for >99 terrestrial mammals. 122 | 123 | ### mammal_diet2 124 | 125 | Combined mammal dietary dataset from Kissling et al. (2014), MammalDIET (see above), and the updated collected dietary information for 1261 mammalian species. 126 | 127 | ### migbehav_birds 128 | 129 | Migratory behaviour in birds: A classification across all living species 130 | 131 | ### PanTHERIA 132 | 133 | A global species-level data set of key life-history, ecological and geographical traits of all known extant and recently extinct mammals. 134 | 135 | ### passerines 136 | 137 | External measurements of approximately one-quarter of passerine bird species taken from Ricklefs 2017. 138 | 139 | The data set includes eight measurements of the external morphology of 1642 species, 140 | roughly one-quarter of all passerine birds (Aves: Order Passeriformes), from all parts of the 141 | world, characterizing the relative proportions of the wing, tail, legs, and beak. Specimens were measured opportunistically over the past 40 years in museums in the United States and Europe. Numbers of individuals measured per species vary from one to dozens in some cases. 142 | Measurements for males and females of sexually size-dimorphic species are presented separately. 143 | The measurements include total length, the lengths of the wing, tail, tarsus, and middle toe, 144 | and the length, breadth, and depth of the beak. Particular attention was paid to obtaining a 145 | broad representation of passerine higher taxa, with special interest in small families and subfamilies of passerines, as well as species produced by evolutionary radiations of birds in archipelagoes, including the Galapagos, Hawaii, and the Lesser Antilles. 146 | 147 | Geographic distributions are summarized from Edwards’s Coded List of Birds of the World. 148 | 149 | North American and South American species are particularly well represented in the sample, as well as species belonging to the families Tyrannidae, Furnariidae, Thamnophilidae, Mimidae, Sturnidae, Fringillidae, Parulidae, Icteridae, Cardinalidae, and Thraupidae. 150 | 151 | The following measurement techniques, paraphrased from Ricklefs and Travis (1980) were used: (1) total length was measured with a plastic ruler from the tip of the bill to the tip of tail; (2) we measured the length of the folded wing, which was flattened along a stiff ruler, from the wrist to the tip of the longest primary; (3) length of the tail was measured from the base of the feathers in the center of the tail to the tip of the longest rectrix. We used dial calipers to measure (0.1 mm) the lengths of the (4) tarsus, (5) middle toe (to the base of the claw), and (6) culmen from the tip of the upper mandible to its kinetic hinge at the front of the skull, and the (7) depth and (8) width of the beak at the kinetic hinge. 152 | 153 | ### reptile_lifehist 154 | 155 | Life-history trait database of European reptile species 156 | 157 | ### tetra_density 158 | 159 | Population density estimates in terrestrial vertebrates 160 | -------------------------------------------------------------------------------- /vignettes/data_info.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | Introduction to traitdata 18 | 19 | 20 | 21 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 |

Introduction to traitdata

48 |

RS-eco

49 |

2022-01-20

50 | 51 | 52 | 53 |
54 |

Taxonomy

55 |
56 |
57 |

Datasets

58 |

There are 32 different datasets, which are currently included in this package:

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 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 |
amniotatraitDatabaseMyrhvold et al. 201610.1890/15-0846R.1
amphi_lifehisttraitDatabaseTrochet et al. 201410.3897/BDJ.2.e4123
amphibiotraitDatabaseOliveira et al. 201710.1038/sdata.2017.123
an_agetraitDatabaseTacutu et al. 201810.1093/nar/gkx1042
anuran_morphotraitDatabaseMendoza-Henao et al. 201910.1002/ecy.2685
arthropodstraitDatabaseGossner et al. 201510.1038/sdata.2015.13
atlantic_birdstraitDatabaseRodrigues et al. 201910.1002/ecy.2647
australian_birdstraitDatabaseGarnett et al. 201510.1038/sdata.2015.61
AvianBodySizetraitDatabaseLislevand et al. 200710.1890/06-2054
bird_behavtraitDatabaseTobias & Pigot 201910.1098/rstb.2019.0012
carabidstraitDatabasevan der Plas et al. 201710.5061/dryad.53ds2
climbertraitDatabaseSchweiger et al. 201410.3897/zookeys.367.6185
dispersetraitDatabaseSarremejane et al. 202010.1038/s41597-020-00732-7
elton_birdstraitDatabaseWilman et al. 201410.1890/13-1917.1
elton_mammalstraitDatabaseWilman et al. 201410.1890/13-1917.1
epiphytestraitDatabaseHietz et al. 202110.1111/1365-2745.13802
eubirdstraitDatabaseStorchová & Hořák 201710.1111/geb.12709
fishmorphtraitDatabaseBrosse et al. 202110.1111/geb.13395
globalHWItraitDatabaseSheard et al. 202010.1038/s41467-020-16313-6
globThermtraitDatabaseBennett et al. 201810.1038/sdata.2018.22
heteropteratraitDatabaseGossner et al. 201610.6084/m9.figshare.c.3307611.v1
heteropteraRawtraitDatabaseGossner et al. 201610.6084/m9.figshare.c.3307611.v1
lizard_traitstraitDatabaseMeiri 201810.1111/geb.12773
mammal_diettraitDatabaseKissling et al. 201410.1002/ece3.1136
mammal_diet2traitDatabaseGainsbury et al. 201810.1111/mam.12119
marsupialstraitDatabaseFisher et al. 200110.1890/0012-9658(2001)082[3531:TEBOLH]2.0.CO;2
migbehav_birdsliteratureDataEyres & Fritz10.12761/SGN.2017.10058
pantheriatraitDatabaseJones et al. 200910.1890/08-1494.1
passerinestraitDatabaseRicklefs 201710.1002/ecy.1783
primatestraitDatabaseGalán-Acedo et al. 202010.1038/s41597-019-0059-9
reptile_lifehisttraitDatabaseGrimm et al. 201410.3897/natureconservation.9.8908
tetra_densitytraitDatabaseSantini et al. 201810.1111/geb.12756
263 |
    264 |
  • 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.
  • 265 |
  • 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.
  • 266 |
267 |
268 |

amniota

269 |

An amniote life-history database to perform comparative analyses with birds, mammals, and reptiles.

270 |
271 |
272 |

amphi_lifehist

273 |

A database of life-history traits of European amphibians

274 |
275 |
276 |

AmphiBio

277 |

A comprehensive database of natural history traits for amphibians worldwide.

278 |
279 |
280 |

AnAge

281 |

Database of Animal Ageing and Longevity

282 |
283 |
284 |

arthropods

285 |

Literature trait data (8 traits) of Coleoptera, Hemiptera, Orthoptera and Araneae species, that were sampled and measured in a project within the Biodiversity Exploratories which focuses on the effect of land use on arthropod community composition and related processes (e.g. species interactions such as herbivory or predation) in three regions of Germany.

286 |
287 |
288 |

bird_behav

289 |

Foraging behaviour and dietary niche of birds

290 |
291 |
292 |

carabids

293 |

Average body measures of 120 Carabid species occuring in the Netherlands.

294 |
295 |
296 |

climber

297 |

Climatic niche characteristics of European butterflies

298 |
299 |
300 |

elton_birds

301 |

Species-level foraging attributes of the world’s birds from EltonTraits.

302 |
303 |
304 |

elton_mammals

305 |

Species-level foraging attributes of the world’s mammals from EltonTraits.

306 |
307 |
308 |

eubirds

309 |

Life-history of European birds

310 |
311 |
312 |

heteroptera & heteropteraRaw

313 |

Morphometric measures of Heteroptera sampled in grasslands across three regions of Germany.

314 |
315 |
316 |

lizard_traits

317 |

Traits of lizards of the world

318 |
319 |
320 |

mammal_diet

321 |

A comprehensive global dataset of diet preferences of mammals (‘MammalDIET’). Diet information was digitized from the literature and extrapolated for species with missing information. The original and extrapolated data cover species-level diet information for >99 terrestrial mammals.

322 |
323 |
324 |

mammal_diet2

325 |

Combined mammal dietary dataset from Kissling et al. (2014), MammalDIET (see above), and the updated collected dietary information for 1261 mammalian species.

326 |
327 |
328 |

migbehav_birds

329 |

Migratory behaviour in birds: A classification across all living species

330 |
331 |
332 |

PanTHERIA

333 |

A global species-level data set of key life-history, ecological and geographical traits of all known extant and recently extinct mammals.

334 |
335 |
336 |

passerines

337 |

External measurements of approximately one-quarter of passerine bird species taken from Ricklefs 2017.

338 |

The data set includes eight measurements of the external morphology of 1642 species, roughly one-quarter of all passerine birds (Aves: Order Passeriformes), from all parts of the world, characterizing the relative proportions of the wing, tail, legs, and beak. Specimens were measured opportunistically over the past 40 years in museums in the United States and Europe. Numbers of individuals measured per species vary from one to dozens in some cases. Measurements for males and females of sexually size-dimorphic species are presented separately. The measurements include total length, the lengths of the wing, tail, tarsus, and middle toe, and the length, breadth, and depth of the beak. Particular attention was paid to obtaining a broad representation of passerine higher taxa, with special interest in small families and subfamilies of passerines, as well as species produced by evolutionary radiations of birds in archipelagoes, including the Galapagos, Hawaii, and the Lesser Antilles.

339 |

Geographic distributions are summarized from Edwards’s Coded List of Birds of the World.

340 |

North American and South American species are particularly well represented in the sample, as well as species belonging to the families Tyrannidae, Furnariidae, Thamnophilidae, Mimidae, Sturnidae, Fringillidae, Parulidae, Icteridae, Cardinalidae, and Thraupidae.

341 |

The following measurement techniques, paraphrased from Ricklefs and Travis (1980) were used: (1) total length was measured with a plastic ruler from the tip of the bill to the tip of tail; (2) we measured the length of the folded wing, which was flattened along a stiff ruler, from the wrist to the tip of the longest primary; (3) length of the tail was measured from the base of the feathers in the center of the tail to the tip of the longest rectrix. We used dial calipers to measure (0.1 mm) the lengths of the (4) tarsus, (5) middle toe (to the base of the claw), and (6) culmen from the tip of the upper mandible to its kinetic hinge at the front of the skull, and the (7) depth and (8) width of the beak at the kinetic hinge.

342 |
343 |
344 |

reptile_lifehist

345 |

Life-history trait database of European reptile species

346 |
347 |
348 |

tetra_density

349 |

Population density estimates in terrestrial vertebrates

350 |
351 |
352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 367 | 368 | 369 | 370 | -------------------------------------------------------------------------------- /vignettes/island-birds.R: -------------------------------------------------------------------------------- 1 | ## ----setup, include = FALSE--------------------------------------------------- 2 | knitr::opts_chunk$set(collapse = TRUE, comment = "#>", eval=F) 3 | 4 | ## ----------------------------------------------------------------------------- 5 | # # Load islands data 6 | # data(largeislands, package="ggmap2") 7 | 8 | ## ----------------------------------------------------------------------------- 9 | # # Read bird data 10 | # data(ter_birds_dist, package="rasterSp") 11 | # 12 | # # Add presence column 13 | # ter_birds_dist$presence <- 1 14 | # 15 | # # Calulate bird SR 16 | # library(dplyr) 17 | # sr_birds <- ter_birds_dist %>% group_by(x, y) %>% 18 | # summarise(sum = sum(presence)) 19 | # library(ggmap2) 20 | # ggmap2(data=sr_birds, name="SR") 21 | 22 | ## ----------------------------------------------------------------------------- 23 | # # Convert bird data to a spatial object 24 | # sp::coordinates(sr_birds) <- ~x+y 25 | # 26 | # # Make sure both files have the same projection 27 | # library(sp) 28 | # proj4string(sr_birds) <- sf::st_crs(largeislands)$proj4string 29 | 30 | ## ----------------------------------------------------------------------------- 31 | # sr_birds <- raster::rasterFromXYZ(sr_birds) 32 | # sr_islands <- raster::extract(sr_birds, largeislands, fun=sum, na.rm=FALSE, sp=TRUE) 33 | # sr_islands <- sr_islands@data 34 | 35 | ## ---- eval=F------------------------------------------------------------------ 36 | # write.csv(sr_islands, "sr_islands.csv", row.names=F) 37 | 38 | ## ----------------------------------------------------------------------------- 39 | # library(dplyr) 40 | # arrange(sr_islands, sum) %>% head(10) %>% select(NAME_ENGLI, Island) %>% unique() 41 | 42 | ## ----eval=F------------------------------------------------------------------- 43 | # # Convert bird data to a spatial object 44 | # sp::coordinates(ter_birds_dist) <- ~x+y 45 | # 46 | # # Make sure both files have the same projection 47 | # proj4string(ter_birds_dist) <- sf::st_crs(largeislands)$proj4string 48 | # 49 | # # SF approach 50 | # 51 | # # Turn ter_birds into sf object 52 | # library(sf) 53 | # ter_birds_dist <- st_as_sf(ter_birds_dist) 54 | # island_birds <- ter_birds_dist[sf::st_within(ter_birds_dist, largeislands),] 55 | # 56 | # # Spatial approach 57 | # 58 | # # Turn large islands into an sp object 59 | # #largeislands <- as(largeislands, "Spatial") 60 | # 61 | # # Extract bird names occuring on islands 62 | # #island_birds <- sp::over(ter_birds_dist, largeislands) 63 | # #island_birds_all <- cbind(ter_birds_dist@data, island_birds) 64 | # #island_birds <- tidyr::drop_na(island_birds_all) 65 | # 66 | # # Only want to have unique names 67 | # island_birds <- unique(island_birds$species) 68 | # head(island_birds) 69 | 70 | ## ---- eval=F------------------------------------------------------------------ 71 | # write.csv(island_birds, "island_birds.csv", row.names=F) 72 | 73 | ## ----------------------------------------------------------------------------- 74 | # library(traitdata) 75 | # data(globTherm) 76 | 77 | ## ---- eval=F------------------------------------------------------------------ 78 | # # Read island birds 79 | # island_birds <- read.csv("island_birds.csv") 80 | # 81 | # # Load standardised taxonomy 82 | # load("data/taxonomyStd.rda") 83 | # 84 | # # Change species column of island birds 85 | # colnames(island_birds) <- "scientificName" 86 | # 87 | # # Check which species have already a standardised taxonomy 88 | # island_birds %>% left_join(taxonomyStd) 89 | # 90 | # # Add standardised taxonomy of remaining species 91 | # #island_species <- traitdata::standardize_taxonomy(island_species, 92 | # # return="scientificNameStd") 93 | 94 | ## ---- eval=F------------------------------------------------------------------ 95 | # #Merge data 96 | # island_birds_traits <- dplyr::full_join(island_species, globTherm, by="scientificNameStd") 97 | 98 | ## ---- eval=F------------------------------------------------------------------ 99 | # # number of unique species 100 | # species_num <- length(unique(island_birds_traits$taxonomyStd)) 101 | # 102 | # # island species with maximum thermal tolerance 103 | # species_tmax <- length(unique(island_birds_traits$taxonomyStd[which(!is.na(island_birds_traits$Tmax))])) 104 | 105 | -------------------------------------------------------------------------------- /vignettes/island-birds.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Trait data availability for island birds" 3 | author: "RS-eco" 4 | date: "`r Sys.Date()`" 5 | output: rmarkdown::html_vignette 6 | vignette: > 7 | %\VignetteIndexEntry{Trait data availability for island birds} 8 | %\VignetteEncoding{UTF-8} 9 | %\VignetteEngine{knitr::rmarkdown} 10 | editor_options: 11 | chunk_output_type: console 12 | --- 13 | 14 | ```{r setup, include = FALSE} 15 | knitr::opts_chunk$set(collapse = TRUE, comment = "#>", eval=F) 16 | ``` 17 | 18 | ## Calculate bird species richness (SR) for each island large than 1 ha 19 | 20 | Load island data 21 | 22 | ```{r} 23 | # Load islands data 24 | data(largeislands, package="ggmap2") 25 | ``` 26 | 27 | Load bird species richness data 28 | 29 | ```{r} 30 | # Read bird data 31 | data(ter_birds_dist, package="rasterSp") 32 | 33 | # Add presence column 34 | ter_birds_dist$presence <- 1 35 | 36 | # Calulate bird SR 37 | library(dplyr) 38 | sr_birds <- ter_birds_dist %>% group_by(x, y) %>% 39 | summarise(sum = sum(presence)) 40 | library(ggmap2) 41 | ggmap2(data=sr_birds, name="SR") 42 | ``` 43 | 44 | ```{r} 45 | # Convert bird data to a spatial object 46 | sp::coordinates(sr_birds) <- ~x+y 47 | 48 | # Make sure both files have the same projection 49 | library(sp) 50 | proj4string(sr_birds) <- sf::st_crs(largeislands)$proj4string 51 | ``` 52 | 53 | Extract bird SR for each island 54 | 55 | ```{r} 56 | sr_birds <- raster::rasterFromXYZ(sr_birds) 57 | sr_islands <- raster::extract(sr_birds, largeislands, fun=sum, na.rm=FALSE, sp=TRUE) 58 | sr_islands <- sr_islands@data 59 | ``` 60 | 61 | Save data to file 62 | 63 | ```{r, eval=F} 64 | write.csv(sr_islands, "sr_islands.csv", row.names=F) 65 | ``` 66 | 67 | Now, we can identify the 10 islands with the highest bird SR 68 | 69 | ```{r} 70 | library(dplyr) 71 | arrange(sr_islands, sum) %>% head(10) %>% select(NAME_ENGLI, Island) %>% unique() 72 | ``` 73 | 74 | ## Identify bird species occuring on islands 75 | 76 | ```{r eval=F} 77 | # Convert bird data to a spatial object 78 | sp::coordinates(ter_birds_dist) <- ~x+y 79 | 80 | # Make sure both files have the same projection 81 | proj4string(ter_birds_dist) <- sf::st_crs(largeislands)$proj4string 82 | 83 | # SF approach 84 | 85 | # Turn ter_birds into sf object 86 | library(sf) 87 | ter_birds_dist <- st_as_sf(ter_birds_dist) 88 | island_birds <- ter_birds_dist[sf::st_within(ter_birds_dist, largeislands),] 89 | 90 | # Spatial approach 91 | 92 | # Turn large islands into an sp object 93 | #largeislands <- as(largeislands, "Spatial") 94 | 95 | # Extract bird names occuring on islands 96 | #island_birds <- sp::over(ter_birds_dist, largeislands) 97 | #island_birds_all <- cbind(ter_birds_dist@data, island_birds) 98 | #island_birds <- tidyr::drop_na(island_birds_all) 99 | 100 | # Only want to have unique names 101 | island_birds <- unique(island_birds$species) 102 | head(island_birds) 103 | ``` 104 | 105 | Save species names of birds that occur on islands to file 106 | 107 | ```{r, eval=F} 108 | write.csv(island_birds, "island_birds.csv", row.names=F) 109 | ``` 110 | 111 | ## Find island birds for which we have traits 112 | 113 | Load traitdata of birds 114 | 115 | ```{r} 116 | library(traitdata) 117 | data(globTherm) 118 | ``` 119 | 120 | Standardise species names of island_birds 121 | 122 | ```{r, eval=F} 123 | # Read island birds 124 | island_birds <- read.csv("island_birds.csv") 125 | 126 | # Load standardised taxonomy 127 | load("data/taxonomyStd.rda") 128 | 129 | # Change species column of island birds 130 | colnames(island_birds) <- "scientificName" 131 | 132 | # Check which species have already a standardised taxonomy 133 | island_birds %>% left_join(taxonomyStd) 134 | 135 | # Add standardised taxonomy of remaining species 136 | #island_species <- traitdata::standardize_taxonomy(island_species, 137 | # return="scientificNameStd") 138 | ``` 139 | 140 | Merge island birds with globTherm 141 | 142 | ```{r, eval=F} 143 | #Merge data 144 | island_birds_traits <- dplyr::full_join(island_species, globTherm, by="scientificNameStd") 145 | ``` 146 | 147 | Identify species that have certain traits 148 | 149 | ```{r, eval=F} 150 | # number of unique species 151 | species_num <- length(unique(island_birds_traits$taxonomyStd)) 152 | 153 | # island species with maximum thermal tolerance 154 | species_tmax <- length(unique(island_birds_traits$taxonomyStd[which(!is.na(island_birds_traits$Tmax))])) 155 | ``` 156 | -------------------------------------------------------------------------------- /vignettes/migbehav_birds.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Migratory behaviour in birds: an attempt of classification across all species" 3 | author: "Alison Eyres & Susanne Fritz" 4 | date: "`r Sys.Date()`" 5 | output: rmarkdown::html_vignette 6 | vignette: > 7 | %\VignetteIndexEntry{Migratory behaviour in birds: an attempt of classification across all species} 8 | %\VignetteEngine{knitr::rmarkdown} 9 | %\VignetteEncoding{UTF-8} 10 | --- 11 | 12 | If you use this dataset, please cite Eyres et al. (2017); this paper also contains essential information of the rationale behind the dataset, although it used version 1 of the dataset (which only differed in not classifying extinct species and some minor mistakes fixed since). Here we provide a methods overview for the classification of migratory behaviour in birds, which is valid for both versions of the dataset. The dataset focuses on seasonal migration, i.e. movements causing an individual adult bird to be found in different locations over the course of one year, excluding everyday routine movements (e.g. foraging movements) and one-way dispersal movements by juveniles (natal dispersal) or adults (Newton 2008). Types or categories of migratory behaviour and different subcategories were recorded and classified with the Handbook of the Birds of the World (del Hoyo 1992-2013 and updates on the Handbook of the Birds of the World Alive website www.hbw.com, accessed until September 2016). 13 | 14 | ### Main categories and subcategories of migratory behaviour within species 15 | 16 | We distinguished these main categories of migratory behaviour (for examples, see Table A1 in Eyres et al. 2017), following Newton (2008): 17 | 18 | - **Directional migration.** Individuals make regular return movements that are clearly seasonal and directional, i.e. they move every year from specific breeding grounds to specific non-breeding locations. Movements have a clear latitudinal or longitudinal directionality. These include typical long-distance migration where entire populations move between geographically separate areas. 19 | - **Dispersive migration.** Individuals make regular post-breeding movements in any direction from breeding sites, i.e. movements are clearly seasonal but have no consistent latitudinal or longitudinal directionality. These include movements typical of many seabirds as these disperse seasonally from their breeding colonies on islands or coasts to roam widely over winter foraging grounds at sea. They also include typical altitudinal movements made consistently in vertical direction but not in one geographical direction. 20 | - **Nomadism.** Individuals make irregular movements from one area to another, residing for a time wherever food is temporarily plentiful, and breeding if possible. Movements are not seasonal and not directional, because the areas successively occupied may lie in various directions from one another and can vary from year to year. 21 | - **Residency.** Individuals are sedentary and do not make major regular or irregular movements. 22 | - **Unknown migratory behaviour.** There is not enough information to classify migratory behaviour as above. 23 | 24 | Initially, we classified intraspecific variation in movement behaviours for each species, so that all different population- and individual-level movements were recorded in a presence-absence matrix of categories and subcategories. The categories are given above; each of the three categories designating movement behaviour (directional migratory, dispersive migratory, and nomadic) was further subdivided into the three different subcategories full, partial, and local. The subcategories were primarily intended to capture the degree of intraspecific variation, as each movement behaviour can occur as follows: 25 | - across all individuals and populations of a species (fully migratory or fully nomadic species), 26 | - just in some populations or parts of populations (partially migratory or partially nomadic species), or 27 | - at a local scale, i.e. only in or over some areas that constitute a small proportion of a species’ distribution (locally migratory or locally nomadic species). 28 | 29 | Note that the distance of migratory movements was disregarded in our classification, except that very short-distance movements were classified as subcategory local (see Table S1 for examples). 30 | Several of the main categories were applied to a species if categories were each classified as only partially or locally in a given category, to capture the behaviours exhibited by each population (e.g. partially migratory species are often also partially resident). Species classified as fully within one category of migratory behaviour (e.g. full directional migrants) could be also classified as locally within another migratory category (e.g. local dispersive migrant or locally nomadic), but not as partially within another category. If a type of migratory behaviour occurred partially in a species, we did not apply the subcategory “local” in the same main category even if the local behaviour applied to a different population; similarly, if “full” applied for a category, none of the other two subcategories (“partial” and “local”) were applied for the same main category. Note that under our classification, a species described as nomadic within one season (usually the non-breeding season) is not partially nomadic, because the behaviour occurs seasonally; instead, it is classified as partially migratory in the “dispersive migration” category. 31 | 32 | Resident behaviour was only distinguished into the subcategories full or partial: 33 | 34 | - Fully resident species are those that show no migratory behaviour of any kind, or only show local migratory (directional and/or dispersive) or local nomadic behaviour. 35 | - Partially resident species are those with sedentary populations or parts of populations, i.e. they should also be classified as partially migratory (directional and/or dispersive) or partially nomadic. 36 | The special cases of altitudinal migration and irruptive behaviour were additionally recorded in separate columns. A species was flagged in the altitudinal migration column of the dataset if some part of one or more populations performed seasonal altitudinal movements, which are usually dispersive rather than directional (Newton 2008). The occurrence of irruptions was flagged in a column independently of nearly all other columns, so that species in any behavioural category could show irruptive behaviour except for fully resident species. 37 | 38 | A comment column was used to enter a brief summary of the descriptions of movements from the Handbook of the Birds of the World, which can therefore differ from the framework used here in their use of definitions to describe migratory behaviour (see e.g. the note on partially nomadic vs. dispersive behaviour above; examples for abbreviated comments and descriptions are in Table A1 of Eyres et al. 2017). We used both the family and species accounts originally from the printed book versions (del Hoyo 1992-2013), but updated most with the Handbook of the Birds of the World Alive webpage (www.hbw.com, accessed April 2016 – November 2017). In general, the mapped geographic distributions also supplied in the Handbook corroborated our categorization of species from the species accounts, but sometimes text descriptions did not match information apparent in the map, which was then mentioned in the migratory status comments. 39 | 40 | ### Species-level classification of migratory behaviour 41 | 42 | In a second step, we classified each species based on the available intraspecific data on movement behaviour. The final migratory behaviour for species with several “partial” subcategories was decided as consistently as possible by a single person for all species, on the basis of proportional representation of behaviours across different populations (see Table A1 in Eyres et al. 2017 for examples). In addition, there is an “uncertain” column in the dataset that was used to flag species where the decision among the main categories of behaviour was difficult because information was lacking to determine which category was predominant (e.g. they were classified as “partial” for more than one behaviour and from the description showed each behaviour to roughly equal extents; or the movement description indicated that movements or seasonal distributions were poorly or inadequately known). 43 | 44 | In the special case of altitudinal migration, species that exclusively perform altitudinal migration within the breeding range were usually classified as species-level residents with “partial” subcategories applying for the “dispersive” and the “resident” category and the “altitudinal” column flagged; if the altitudinal migration caused the species’ distribution to have large distinct seasonal areas mapped, e.g. Himalayan birds migrating down and southwards into the adjacent lowlands, the species was classified as species-level dispersive with “partial” subcategories applying for the “dispersive” and the “resident” category and the “altitudinal” column flagged (see Phylloscopidae example species in Table A1, Eyres et al. 2017). 45 | 46 | The “unknown” category of movement behaviour was only applied to very few species where migratory behaviour really was completely unclear, e.g. those only known from a few museum specimen, and the “uncertain” column was used to flag only cases where there was reason to doubt a particular classification as any of the main categories. For some species, the “movement” section in the Handbook only said “no information”, which was generally entered in the comment column. These species were usually mapped as resident in the Handbook itself and often had restricted ranges or were part of higher taxa consisting exclusively of residents; in these cases, species were classified as resident without flagging in the “uncertain” column (as any large-scale movement behaviour is highly unlikely for these species), and the comment “presumed resident” was added with a qualifier in brackets (e.g. “New Guinea” for species endemic to New Guinea, or “HBW map year-round only”). 47 | 48 | The database contains the full list of 10596 species as given by the IOC version 3.1 (Gill & Donsker 2012). In version 2, we also classified the movement behaviour of 155 extinct species; these are flagged in a “fully extinct” column, and were mostly species officially declared extinct, plus a few that have not been documented in decades but are listed as “critically endangered (possibly extinct)” (IUCN Red List at www.iucnredlist.com, accessed April-September 2016). Further, we used a “partially extinct” column to flag a further 49 species affected by the extinction of whole populations or across entire geographic entities (typically islands); this was to highlight that migratory behaviour of extinct populations for these species might be unknown or badly known, and might have been different from the extant populations used as the basis of our classification. 49 | 50 | We also classified species as fully or partially marine, to highlight seabirds and waterbirds whose geographic distributions are fully or partially mapped at sea. Marine species were defined as spending most of their daily movements in marine environments, typically foraging in any marine habitat from tidal flats to pelagic or open sea, so that geographic distributions are mapped at sea (at least partially). Fully marine species were defined to also breed in marine environments, usually along coasts or on oceanic islands, and very little of their distribution was usually mapped on land. Partially marine species were defined as occurring seasonally in terrestrial or freshwater environments, so these may breed on land close to or far from the coast. There were 252 fully marine species and a further 117 partially marine species (numbers for version 2 of the dataset). 51 | 52 | ### Examples of detailed descriptions and how they were classified 53 | 54 | Below, we give some examples of how descriptions of movements in the Handbook were interpreted in our database, and summarize the key parameters for each categorization. In general, if a behaviour was described as occurring “possibly”, “maybe”, “likely”, or similar, we added the description in the comment column but did not use the information for categorization; stronger words like “probably” or “apparently” were often used for categorization, but usually the uncertainty column was then flagged. Descriptions that were too vague (“migration / movements suspected / suggested” or “may show migration / movements”) were recorded in the comments but disregarded for categorization (but note that “some seasonal / dispersive / nomadic / irregular movements” was recorded as locally dispersive or locally nomadic). This rule did not apply to the description of resident behaviour, as in many cases the movement text only said “apparently”, “presumably”, or “probably” resident or sedentary; if there was no further information given, the species was classified as resident. 55 | 56 | 57 | **Directional migration:** regular seasonality of movements and clear directionality of seasonal movement. 58 | 59 | - Full: all individuals (or virtually all individuals) of the species migrate seasonally between distinct breeding and non-breeding areas. Should usually have separate areas on the map, unless distribution not well known. Described usually as “migratory” or “fully migratory”. 60 | - Partial: only part of a population or only some populations migrate seasonally between distinct breeding and non-breeding areas. Usually have separate areas on the map, but not if migratory populations winter (or breed) in areas where other populations breed (or winter, or both). Usually described as “partially migratory”, but can be described as “somewhat migratory” or even “mostly / mainly / largely resident / sedentary” if there is a directional migration described for at least one sizable population or for a substantial part of the global population. Can also be described as “migratory” in the special case of seabirds that disperse to some degree and year-round around the breeding colonies (usually oceanic islands or rocky coasts), but with overall directional movement tendencies in a specific season (these were classified as partially migratory and partially dispersive). Usually not classified if seasonal movements clearly depend on weather (typically following rains) or resource availability, as these are not usually directional and therefore classified as dispersive migration. 61 | - Local: individuals migrate directionally only in some regions that constitute a small proportion of a species’ distribution, and movements are at a relatively local scale. Can have separate areas on the map but these should be quite a small proportion of the whole range; usually no separate areas on the map. Has to be described as “local / short-range / limited seasonal migration / movements” with clear seasonal occurrence in defined regions, not just as “local / short-range / limited movements following water / resource availability”. 62 | 63 | **Dispersive migration:** regular seasonality of movements and no clear directionality of seasonal movement. 64 | 65 | - Full: all individuals (or virtually all individuals) of the species migrate seasonally, but breeding and non-breeding areas are usually not fully distinct or are just adjacent to each other; often, non-breeding areas are mapped around or close to year-round or breeding areas, and in some cases only year-round areas are mapped. Described usually as “dispersive”, “extensive / marked post-breeding dispersal”, “extensive / marked seasonal wandering” or as “migratory” with description of the dispersive behaviour (e.g. “disperses along coasts in non-breeding season”, “seasonal dispersive movements following rains / resource availability”). Altitudinal migrants (described as “altitudinal migration”, “seasonal altitudinal movements”, “regular elevational shifts” etc.) were classified as fully dispersive in the rare cases where separate breeding and non-breeding areas were mapped, but movements should be regularly seasonal and not be described as occurring only occasionally or in extreme weather. Fully dispersive behaviour also occurs in species that breed on or around freshwater and then disperse to coasts and winter on estuaries or at sea. 66 | 67 | - Partial: only part of a population or only some populations migrate seasonally, with breeding and non-breeding areas usually not fully distinct or just adjacent to each other for even just the migratory individuals or populations. As with full dispersive migration, non-breeding areas are mapped around or close to year-round or breeding areas, and in many cases only year-round areas are mapped (unless species also shows partial directional migration in other populations). Described as “partially dispersive”, “extensive post-breeding dispersal”, or “partially migratory” with description of the seasonal dispersive behaviour (e.g. “disperses along coasts in non-breeding season”, “seasonal movements following rains / resource availability”, “seasonal extensive wandering”, etc.); can also be described as “partially nomadic” or “with irregular dispersion” if the nomadic or dispersive behaviour only occurs in one season (usually “nomadic in the non-breeding season”). Partial dispersive behaviour was classified for most altitudinal migrants (including altitudinal migration within the breeding range) if these did not have separately mapped non-breeding areas, as well as for most seabirds, which usually have separately mapped breeding colonies and non-breeding distributions; dispersive behaviour was categorized based on expressions as described above for fully dispersive migrants but occurring in only part of the populations or individuals. Can be described as “somewhat dispersive” or even “mostly / mainly / largely resident / sedentary” if there is dispersive migration described for at least one sizable population or for a substantial part of the global population. 68 | 69 | - Local: individuals disperse seasonally only in some regions that constitute a small proportion of a species’ distribution, and dispersive movements are at a relatively local scale. Usually no separate areas on the map (unless also showing partial directional migration in other areas), or some small non-breeding areas adjacent to larger year-round areas. Has to be described as “locally dispersive” with clear seasonal dispersive behaviour, “local / marked post-breeding dispersal”, “local / short-range / limited dispersive movements”, “local / short-range / limited seasonal movements following water / resource availability”, “local seasonal habitat shifts”, “some wandering / dispersive movements / seasonal movements / local movements”, or with “regular / seasonal / local wandering”. 70 | 71 | **Nomadism:** irregular movements that are not seasonal and no clear directionality of movement. 72 | 73 | - Full: all individuals (or virtually all individuals) of the species make irregular movements from one area to another, residing for a time wherever food is temporarily plentiful, and breeding if possible. Usually no seasonally distinct areas mapped. Has to be described as “nomadic” or “fully nomadic”, or as wandering without seasonal pattern, and usually breeds any time of the year. 74 | - Partial: only part of a population or only some populations make irregular movements. Can have seasonally distinct areas mapped if also partially migratory. Can be described as “partially nomadic” (in the sense of not all populations being nomadic, but not in the temporal sense as in “nomadic during non-breeding season”), “partially showing irregular movements”, “partial irregular wandering”, or similar; can also be described as “mostly / mainly / largely resident / sedentary” if there is nomadic behaviour described for at least one sizable population or for a substantial part of the global population. 75 | - Local: individuals move nomadically only in some regions that constitute a small proportion of a species’ distribution, and nomadic movements are at a relatively local scale. No distinct areas mapped unless also partially migratory. Can be described as “locally nomadic”, “nomadic or irregular local / small-scale / limited movements related to water / resource availability”, “limited nomadism”, or “limited irregular wandering”. 76 | 77 | ### References 78 | 79 | Del Hoyo, J. 1992-2013. Handbook of the Birds of the World. Vol. 1-16 and Special Vol. Lynx Edicions, Barcelona. 80 | 81 | Eyres, A., Böhning-Gaese, K. & Fritz, S. A. 2017 Quantification of climatic niches in birds: adding the temporal dimension. Journal of Avian Biology online (doi: 10.1111/jav.01308) 82 | 83 | Gill, F. & Donsker, D. 2012. IOC World Bird List (v. 3.1). Available at www.worldbirdnames.org. Accessed September 2012. 84 | 85 | Newton, I. 2008. The Migration Ecology of Birds. Academic Press, London. 86 | -------------------------------------------------------------------------------- /vignettes/morpho-indices.R: -------------------------------------------------------------------------------- 1 | ## ----setup, include = FALSE--------------------------------------------------- 2 | knitr::opts_chunk$set(collapse = TRUE, comment = "#>") 3 | 4 | ## ----------------------------------------------------------------------------- 5 | #' First we load our Data 6 | library(traitdata) 7 | data(passerines) 8 | 9 | #' Secondly, we need to load the dplyr library 10 | library(dplyr) 11 | 12 | #' Now, we can calculate the indices using the mutate function from the dplyr package 13 | passerines <- passerines %>% 14 | mutate(tail_wing_index = Tail / Wing, 15 | bill_height_index = `Bill D` / `Bill L`, 16 | bill_width_index = `Bill W` / `Bill L`) 17 | #kipp_index = kipp / Wing, 18 | #lateral_tarsus_index = lateral.tarsus.diameter / tarsus.length 19 | #sagittal_tarsus_index = sagittal.tarsus.diamter / tarsus.length 20 | 21 | ## ---- fig.width=7, fig.height=3----------------------------------------------- 22 | #' Load the ggplot2 library 23 | library(ggplot2); library(patchwork) 24 | 25 | #' Plot a histogram of the 3 indices 26 | p1 <- passerines %>% ggplot() + geom_histogram(aes(x=tail_wing_index)) + 27 | scale_y_continuous(expand=expansion(add=c(0,10))) + 28 | labs(x="Tail wing index", y="Frequency") + theme_bw() 29 | p2 <- passerines %>% ggplot() + geom_histogram(aes(x=bill_height_index)) + 30 | scale_y_continuous(expand=expansion(add=c(0,10))) + 31 | labs(x="Bill height index", y="") + theme_bw() 32 | p3 <- passerines %>% ggplot() + geom_histogram(aes(x=bill_width_index)) + 33 | scale_y_continuous(expand=expansion(add=c(0,10))) + 34 | labs(x="Bill width index", y="") + theme_bw() 35 | p1 + p2 + p3 36 | 37 | -------------------------------------------------------------------------------- /vignettes/morpho-indices.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Morphological indices" 3 | author: "RS-eco" 4 | date: "`r Sys.Date()`" 5 | output: rmarkdown::html_vignette 6 | vignette: > 7 | %\VignetteIndexEntry{Morphological indices} 8 | %\VignetteEncoding{UTF-8} 9 | %\VignetteEngine{knitr::rmarkdown} 10 | editor_options: 11 | chunk_output_type: console 12 | --- 13 | 14 | ```{r setup, include = FALSE} 15 | knitr::opts_chunk$set(collapse = TRUE, comment = "#>") 16 | ``` 17 | 18 | ## Morphological indices 19 | 20 | Morphological indices can be helpful to depict ecological differences between feeding guilds and between species differing in their preferred foraging stratum. 21 | 22 | There are 6 morphological indices, which are often calculated: 23 | 24 | * Kipp’s index (Kipp’s distance divided by wing length), 25 | * tail-wing index (the longest rectrix divided by wing length), 26 | * bill height index (bill height divided by bill length), 27 | * bill width index (bill width divided by bill length), 28 | * lateral tarsus index (lateral tarsus diameter divided by tarsus length) and 29 | * sagittal tarsus index (sagittal tarsus diameter divided by tarsus length). 30 | 31 | Here, we show how to calculate these indices, using the data included in this package: 32 | 33 | ```{r} 34 | #' First we load our Data 35 | library(traitdata) 36 | data(passerines) 37 | 38 | #' Secondly, we need to load the dplyr library 39 | library(dplyr) 40 | 41 | #' Now, we can calculate the indices using the mutate function from the dplyr package 42 | passerines <- passerines %>% 43 | mutate(tail_wing_index = Tail / Wing, 44 | bill_height_index = `Bill D` / `Bill L`, 45 | bill_width_index = `Bill W` / `Bill L`) 46 | #kipp_index = kipp / Wing, 47 | #lateral_tarsus_index = lateral.tarsus.diameter / tarsus.length 48 | #sagittal_tarsus_index = sagittal.tarsus.diamter / tarsus.length 49 | ``` 50 | 51 | Now, we want to plot these indices: 52 | 53 | ```{r, fig.width=7, fig.height=3} 54 | #' Load the ggplot2 library 55 | library(ggplot2); library(patchwork) 56 | 57 | #' Plot a histogram of the 3 indices 58 | p1 <- passerines %>% ggplot() + geom_histogram(aes(x=tail_wing_index)) + 59 | scale_y_continuous(expand=expansion(add=c(0,10))) + 60 | labs(x="Tail wing index", y="Frequency") + theme_bw() 61 | p2 <- passerines %>% ggplot() + geom_histogram(aes(x=bill_height_index)) + 62 | scale_y_continuous(expand=expansion(add=c(0,10))) + 63 | labs(x="Bill height index", y="") + theme_bw() 64 | p3 <- passerines %>% ggplot() + geom_histogram(aes(x=bill_width_index)) + 65 | scale_y_continuous(expand=expansion(add=c(0,10))) + 66 | labs(x="Bill width index", y="") + theme_bw() 67 | p1 + p2 + p3 68 | ``` 69 | 70 | -------------------------------------------------------------------------------- /vignettes/pantheria.R: -------------------------------------------------------------------------------- 1 | ## ----setup, include = FALSE--------------------------------------------------- 2 | knitr::opts_chunk$set(collapse = TRUE, comment = "#>") 3 | 4 | ## ----------------------------------------------------------------------------- 5 | library(traitdata) 6 | data(pantheria) 7 | 8 | ## ----------------------------------------------------------------------------- 9 | library(dplyr) 10 | 11 | ## ----------------------------------------------------------------------------- 12 | tbl_df(pantheria) 13 | 14 | ## ---- eval=F------------------------------------------------------------------ 15 | # glimpse(pantheria) 16 | 17 | ## ----------------------------------------------------------------------------- 18 | select(pantheria, AdultHeadBodyLen_mm:LitterSize) %>% head() 19 | 20 | ## ----------------------------------------------------------------------------- 21 | filter(pantheria, Order == "Carnivora" & AdultBodyMass_g < 200) %>% head() 22 | 23 | ## ----------------------------------------------------------------------------- 24 | arrange(pantheria, AdultBodyMass_g)[ , 1:3] %>% head() 25 | 26 | ## ----------------------------------------------------------------------------- 27 | head(mutate(pantheria, 28 | g_per_mm = AdultBodyMass_g / AdultHeadBodyLen_mm)) 29 | 30 | ## ----------------------------------------------------------------------------- 31 | head(summarise(group_by(pantheria, Order), 32 | mean_mass = mean(AdultBodyMass_g, na.rm = TRUE))) 33 | 34 | ## ----------------------------------------------------------------------------- 35 | pantheria %>% arrange(AdultBodyMass_g) %>% head() 36 | 37 | ## ----------------------------------------------------------------------------- 38 | pantheria %>% 39 | mutate(mass_to_length = AdultBodyMass_g / AdultHeadBodyLen_mm) %>% 40 | arrange(desc(mass_to_length)) %>% 41 | select(scientificNameStd, mass_to_length) %>% head() 42 | 43 | ## ----------------------------------------------------------------------------- 44 | pantheria %>% group_by(Order) %>% 45 | summarise(median_litter = median(LitterSize, na.rm = TRUE)) %>% 46 | filter(median_litter > 3) %>% 47 | arrange(desc(median_litter)) %>% 48 | select(Order, median_litter) 49 | 50 | -------------------------------------------------------------------------------- /vignettes/pantheria.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "PanTHERIA - mammal life-history, geography and ecology traits" 3 | author: "RS-eco" 4 | date: "`r Sys.Date()`" 5 | output: rmarkdown::html_vignette 6 | vignette: > 7 | %\VignetteIndexEntry{PanTHERIA - mammal life-history, geography and ecology traits} 8 | %\VignetteEngine{knitr::rmarkdown} 9 | %\VignetteEncoding{UTF-8} 10 | --- 11 | 12 | ```{r setup, include = FALSE} 13 | knitr::opts_chunk$set(collapse = TRUE, comment = "#>") 14 | ``` 15 | 16 | We’re going to work with the PanTHERIA database, a dataset of mammal life-history, geography, and ecology traits: 17 | 18 | Jones, K.E., et al. PanTHERIA: a species-level database of life history, ecology, and geography of extant and recently extinct mammals. Ecology 90:2648. http://esapubs.org/archive/ecol/E090/184/ 19 | 20 | First we’ll load the data: 21 | 22 | ```{r} 23 | library(traitdata) 24 | data(pantheria) 25 | ``` 26 | 27 | Next we’ll load the dplyr package: 28 | 29 | ```{r} 30 | library(dplyr) 31 | ``` 32 | 33 | Looking at the data 34 | 35 | Data frames look a bit different in dplyr. Above, I called the tbl_df() function on our data. This provides more useful printing of data frames in the console. Ever accidentally printed a massive data frame in the console before? Yeah, this avoids that. You don’t need to change your data to a data frame tbl first — the dplyr functions will automatically convert your data when you call them. This is what the data look like on the console: 36 | 37 | ```{r} 38 | tbl_df(pantheria) 39 | ``` 40 | 41 | dplyr also provides a function glimpse() that makes it easy to look at our data in a transposed view. It’s similar to the str() (structure) function, but has a few advantages (see ?glimpse). 42 | 43 | ```{r, eval=F} 44 | glimpse(pantheria) 45 | ``` 46 | 47 | Selecting columns 48 | 49 | select() lets you subset by columns. This is similar to subset() in base R, but it also allows for some fancy use of helper functions such as contains(), starts_with() and, ends_with(). I think these examples are self explanatory, so I’ll just include them here: 50 | 51 | ```{r} 52 | select(pantheria, AdultHeadBodyLen_mm:LitterSize) %>% head() 53 | ``` 54 | 55 | Filtering rows 56 | 57 | filter() lets you subset by rows. You can use any valid logical statements: 58 | 59 | ```{r} 60 | filter(pantheria, Order == "Carnivora" & AdultBodyMass_g < 200) %>% head() 61 | ``` 62 | 63 | Arranging rows 64 | 65 | arrange() lets you order the rows by one or more columns in ascending or descending order. I’m selecting the first three columns only to make the output easier to read: 66 | 67 | ```{r} 68 | arrange(pantheria, AdultBodyMass_g)[ , 1:3] %>% head() 69 | ``` 70 | 71 | Mutating columns 72 | 73 | mutate() lets you add new columns. Notice that the new columns you create can build on each other. I will wrap these in glimpse() to make the new columns easy to see: 74 | 75 | ```{r} 76 | head(mutate(pantheria, 77 | g_per_mm = AdultBodyMass_g / AdultHeadBodyLen_mm)) 78 | ``` 79 | 80 | Summarising columns 81 | 82 | Finally, summarise() lets you calculate summary statistics. On its own summarise() isn’t that useful, but when combined with group_by() you can summarise by chunks of data. This is similar to what you might be familiar with through ddply() and summarise() from the plyr package: 83 | 84 | ```{r} 85 | head(summarise(group_by(pantheria, Order), 86 | mean_mass = mean(AdultBodyMass_g, na.rm = TRUE))) 87 | ``` 88 | 89 | Piping data 90 | 91 | Pipes take the output from one function and feed it to the first argument of the next function. 92 | 93 | The magrittr R package contains the pipe function %>%. Yes it might look bizarre at first but it makes more sense when you think about it. The R language allows symbols wrapped in % to be defined as functions, the > helps imply a chain, and you can hit these 2 characters one after the other very quickly on a keyboard by holding down the Shift key. Try pronouncing %>% “then” whenever you see it. 94 | 95 | Let’s try a single-pipe dplyr example. We’ll pipe the pantheria data frame to the arrange function’s first argument, and choose to arrange by the adult_body_mass_g column: 96 | 97 | ```{r} 98 | pantheria %>% arrange(AdultBodyMass_g) %>% head() 99 | ``` 100 | 101 | An awesome example 102 | 103 | OK, here’s where it gets cool. We can chain dplyr functions in succession. This lets us write data manipulation steps in the order we think of them and avoid creating temporary variables in the middle to capture the output. This works because the output from every dplyr function is a data frame and the first argument of every dplyr function is a data frame. 104 | 105 | Say we wanted to find the species with the highest body-mass-to-length ratio: 106 | 107 | ```{r} 108 | pantheria %>% 109 | mutate(mass_to_length = AdultBodyMass_g / AdultHeadBodyLen_mm) %>% 110 | arrange(desc(mass_to_length)) %>% 111 | select(scientificNameStd, mass_to_length) %>% head() 112 | ``` 113 | 114 | So, we took pantheria, fed it to mutate() to create a mass-length ratio column, arranged the resulting data frame in descending order by that ratio, and selected the columns we wanted to see. This is just the beginning. If you can imagine it, you can string it together. If you want to debug your code, just pull a pipe off the end and run the code down to that step. Or build your analysis up and add successive pipes. 115 | 116 | Here’s one more example. Let’s ask what taxonomic orders have a median litter size greater than 3. 117 | 118 | ```{r} 119 | pantheria %>% group_by(Order) %>% 120 | summarise(median_litter = median(LitterSize, na.rm = TRUE)) %>% 121 | filter(median_litter > 3) %>% 122 | arrange(desc(median_litter)) %>% 123 | select(Order, median_litter) 124 | ``` 125 | -------------------------------------------------------------------------------- /vignettes/passerines.R: -------------------------------------------------------------------------------- 1 | ## ----setup, include = FALSE--------------------------------------------------- 2 | knitr::opts_chunk$set( 3 | collapse = TRUE, 4 | comment = "#>" 5 | ) 6 | 7 | ## ----------------------------------------------------------------------------- 8 | library(traitdata) 9 | data(passerines) 10 | 11 | ## ----------------------------------------------------------------------------- 12 | library(dplyr) 13 | 14 | ## ----------------------------------------------------------------------------- 15 | tbl_df(passerines) 16 | 17 | ## ----------------------------------------------------------------------------- 18 | glimpse(passerines) 19 | 20 | ## ----------------------------------------------------------------------------- 21 | select(passerines, Length, Wing, Tail) %>% head() 22 | 23 | select(passerines, HN:AI) %>% head() 24 | 25 | select(passerines, 1:3) %>% head() 26 | 27 | ## ----------------------------------------------------------------------------- 28 | filter(passerines, Length > 30)[ , 1:3] %>% head() 29 | 30 | filter(passerines, scientificNameStd == "Passer domesticus") %>% head() 31 | 32 | filter(passerines, Length > 30 & AU == 1) %>% head() 33 | 34 | ## ----------------------------------------------------------------------------- 35 | arrange(passerines, Length)[ , 1:3] %>% head() 36 | 37 | arrange(passerines, desc(Length))[ , 1:3] %>% head() 38 | 39 | arrange(passerines, Length, Wing, Tail)[, 1:3] %>% head() 40 | 41 | ## ---- eval=F------------------------------------------------------------------ 42 | # # Find meaningful example 43 | # #glimpse(mutate(passerines, 44 | # # g_per_mm = AdultBodyMass_g / AdultHeadBodyLen_mm)) 45 | 46 | ## ----------------------------------------------------------------------------- 47 | summarise(passerines, mean_length = mean(Length, na.rm = TRUE)) 48 | 49 | head(summarise(group_by(passerines, Family), 50 | mean_length = mean(Length, na.rm = TRUE))) 51 | 52 | -------------------------------------------------------------------------------- /vignettes/passerines.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Passerine birds" 3 | author: "RS-eco" 4 | date: "`r Sys.Date()`" 5 | output: rmarkdown::html_vignette 6 | vignette: > 7 | %\VignetteIndexEntry{Passerine birds} 8 | %\VignetteEngine{knitr::rmarkdown} 9 | %\VignetteEncoding{UTF-8} 10 | --- 11 | 12 | ```{r setup, include = FALSE} 13 | knitr::opts_chunk$set( 14 | collapse = TRUE, 15 | comment = "#>" 16 | ) 17 | ``` 18 | 19 | We’re going to work with the passerines database, a dataset of external morphology measurements of approximately one-quarter of passerine bird species taken from Ricklefs 2017. 20 | 21 | E. Ricklefs, Robert (2017): Passerine morphology: external measurements of approximately one-quarter of passerine bird species. Ecology, 98:1472. 10.1002/ecy.1783. 22 | 23 | First we’ll load the data: 24 | 25 | ```{r} 26 | library(traitdata) 27 | data(passerines) 28 | ``` 29 | 30 | Next we’ll load the dplyr package: 31 | 32 | ```{r} 33 | library(dplyr) 34 | ``` 35 | 36 | Looking at the data 37 | 38 | Data frames look a bit different in dplyr. Above, I called the tbl_df() function on our data. This provides more useful printing of data frames in the console. Ever accidentally printed a massive data frame in the console before? Yeah… this avoids that. You don’t need to change your data to a data frame tbl first — the dplyr functions will automatically convert your data when you call them. This is what the data look like on the console: 39 | 40 | ```{r} 41 | tbl_df(passerines) 42 | ``` 43 | 44 | dplyr also provides a function glimpse() that makes it easy to look at our data in a transposed view. It’s similar to the str() (structure) function, but has a few advantages (see ?glimpse). 45 | 46 | ```{r} 47 | glimpse(passerines) 48 | ``` 49 | 50 | Selecting columns 51 | 52 | select() lets you subset by columns. This is similar to subset() in base R, but it also allows for some fancy use of helper functions such as contains(), starts_with() and, ends_with(). I think these examples are self explanatory, so I’ll just include them here: 53 | 54 | ```{r} 55 | select(passerines, Length, Wing, Tail) %>% head() 56 | 57 | select(passerines, HN:AI) %>% head() 58 | 59 | select(passerines, 1:3) %>% head() 60 | ``` 61 | 62 | Filtering rows 63 | 64 | filter() lets you subset by rows. You can use any valid logical statements: 65 | 66 | ```{r} 67 | filter(passerines, Length > 30)[ , 1:3] %>% head() 68 | 69 | filter(passerines, scientificNameStd == "Passer domesticus") %>% head() 70 | 71 | filter(passerines, Length > 30 & AU == 1) %>% head() 72 | ``` 73 | 74 | Arranging rows 75 | 76 | arrange() lets you order the rows by one or more columns in ascending or descending order. I’m selecting the first three columns only to make the output easier to read: 77 | 78 | ```{r} 79 | arrange(passerines, Length)[ , 1:3] %>% head() 80 | 81 | arrange(passerines, desc(Length))[ , 1:3] %>% head() 82 | 83 | arrange(passerines, Length, Wing, Tail)[, 1:3] %>% head() 84 | ``` 85 | 86 | 97 | 98 | Summarising columns 99 | 100 | Finally, summarise() lets you calculate summary statistics. On its own summarise() isn’t that useful, but when combined with group_by() you can summarise by chunks of data. This is similar to what you might be familiar with through ddply() and summarise() from the plyr package: 101 | 102 | ```{r} 103 | summarise(passerines, mean_length = mean(Length, na.rm = TRUE)) 104 | 105 | head(summarise(group_by(passerines, Family), 106 | mean_length = mean(Length, na.rm = TRUE))) 107 | ``` 108 | -------------------------------------------------------------------------------- /vignettes/trait_glossary.R: -------------------------------------------------------------------------------- 1 | ## ----setup, include=FALSE----------------------------------------------------- 2 | knitr::opts_chunk$set(collapse = TRUE, comment = "#>") 3 | 4 | ## ----------------------------------------------------------------------------- 5 | library(traitdata) 6 | data(trait_glossary) 7 | knitr::kable(x=data.frame(trait_glossary)) 8 | 9 | -------------------------------------------------------------------------------- /vignettes/trait_glossary.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Glossary" 3 | author: "RS-eco" 4 | date: "`r Sys.Date()`" 5 | output: rmarkdown::html_vignette 6 | vignette: > 7 | %\VignetteIndexEntry{Glossary} 8 | %\VignetteEngine{knitr::rmarkdown} 9 | %\VignetteEncoding{UTF-8} 10 | --- 11 | 12 | ```{r setup, include=FALSE} 13 | knitr::opts_chunk$set(collapse = TRUE, comment = "#>") 14 | ``` 15 | 16 | Here, I just want to give you an overview over the glossary of the data included in the traitdata package: 17 | 18 | ```{r} 19 | library(traitdata) 20 | data(trait_glossary) 21 | knitr::kable(x=data.frame(trait_glossary)) 22 | ``` 23 | --------------------------------------------------------------------------------