diff --git a/R/data.R b/R/data.R index f72d25f..a218abb 100644 --- a/R/data.R +++ b/R/data.R @@ -1,9 +1,11 @@ #' Functional Arthropod Traits #' -#' Data from: A summary of eight traits of Coleoptera, Hemiptera, Orthoptera and -#' Araneae, occurring in grasslands in Germany. +#' @description Data from: A summary of eight traits of Coleoptera, Hemiptera, Orthoptera and +#' Araneae, occurring in grasslands in Germany. +#' +#' @author Gossner MM, Simons NK, Achtziger R, Blick T, Dorow WHO, Dziock F, Köhler F, Rabitsch W, Weisser WW #' -#' @details When using this data, please cite the original publication: +#' @details When using this data, please cite the original publication: #' #' \itemize{ \item Gossner MM, Simons NK, Achtziger R, Blick T, Dorow WHO, #' Dziock F, Köhler F, Rabitsch W, Weisser WW (2015) A summary of eight traits @@ -19,11 +21,11 @@ #' Araneae, occurring in grasslands in Germany. Dryad Digital Repository. #' http://dx.doi.org/10.5061/dryad.53ds2 } #' -#' @author Gossner MM, Simons NK, Achtziger R, Blick T, Dorow WHO, Dziock F, Köhler F, Rabitsch W, Weisser WW -#' -#' @family rawdata +#' @format For trait definitions and codes please refer to \url{https://www.nature.com/articles/sdata201513/tables/2} #' -#' @source \url{http://dx.doi.org/10.5061/dryad.53ds2}; +#' @family rawdata +#' +#' @source \url{http://dx.doi.org/10.5061/dryad.53ds2}; #' \href{http://creativecommons.org/publicdomain/zero/1.0/}{Creative Commons #' 0}. To the extent possible under law, the authors have waived all copyright #' and related or neighboring rights to this data. @@ -66,6 +68,12 @@ #' \item resid_antenna = residual antenna length in mm (i.e. residual #' from linear model in which antenna length is explained by body length) #' } +#' +#' Description: information on body size, dispersal ability, feeding guild and specialization (within herbivores), feeding mode, +#' feeding tissue (within herbivorous suckers), plant part (within herbivorous chewers), endophagous lifestyle (within herbivores), +#' and vertical stratum use for 1,230 species of Coleoptera, Hemiptera (Heteroptera, Auchenorrhyncha), Orthoptera (Saltatoria: Ensifera, +#' Caelifera), and Araneae, sampled by sweep-netting between 2008 and 2012. We compiled traits from various literature sources and +#' complemented data from reliable internet sources and the authors’ experience. #' #' @family rawdata #' @@ -85,32 +93,29 @@ #' @author Martin M. Gossner , Nadja K. Simons, Leonhard Höck, Wolfgang W. #' Weisser #' -#' @source \url{https://figshare.com/articles/Data_Paper_Data_Paper/3561936}; -#' \href{http://creativecommons.org/publicdomain/zero/1.0/}{Creative Commons -#' 0}. To the extent possible under law, the authors have waived all copyright -#' and related or neighboring rights to this data. +#' @details When using this data, please cite the original publication: +#' +#' \itemize{ \item M. Gossner, Martin; K. Simons, +#' Nadja; Höck, Leonhard; W. Weisser, Wolfgang (2016): Morphometric measures +#' of Heteroptera sampled in grasslands across three regions of Germany. +#' figshare. https://doi.org/10.6084/m9.figshare.c.3307611.v1} +#' +#' @format The dataset \code{heteropteraRaw} contains multiple observations of +#' each species (occurence table). The dataset \code{heteroptera} is a +#' compiled species-trait matrix. For column definitions please see: +#' \url{https://figshare.com/articles/Data_Paper_Data_Paper/3561936} #' -#' @description The data sets comprise morphometric trait data of species that +#' Description: The data sets comprise morphometric trait data of species that #' were sampled and measured within the a subproject of the Biodiversity #' Exploratories Project (Fischer et al. 2010) which focuses on the effect of #' land use on arthropod community composition and related processes in three #' regions of Germany (Gossner et al. 2014, Simons et al. 2014, Simons et al. #' 2015). -#' @return The dataset \code{heteropteraRaw} contains multiple observations of -#' each species (occurence table). The dataset \code{heteroptera} is a -#' compiled species-trait matrix. #' -#' @details Cite this dataset as: \itemize{ \item M. Gossner, Martin; K. Simons, -#' Nadja; Höck, Leonhard; W. Weisser, Wolfgang (2016): Morphometric measures -#' of Heteroptera sampled in grasslands across three regions of Germany. -#' figshare. https://doi.org/10.6084/m9.figshare.c.3307611.v1 } #' #' @family rawdata +#' "heteroptera_raw" - - -#' @rdname heteroptera_raw -#' @family rawdata "heteroptera" # ------------------------------------------------------------------- @@ -123,17 +128,57 @@ #' @author Nathan P. Myhrvold, Elita Baldridge, Benjamin Chan, Dhileep Sivam, #' Daniel L. Freeman, and S. K. Morgan Ernest #' -#' @source Cite this dataset as \itemize{ \item P. Myhrvold, Nathan; Baldridge, +#' @details When using this data, please cite the original publication: +#' +#' \itemize{ \item P. Myhrvold, Nathan; Baldridge, #' Elita; Chan, Benjamin; Sivam, Dhileep; L. Freeman, Daniel; Ernest, S. K. #' Morgan (2016): An amniote life-history database to perform comparative #' analyses with birds, mammals, and reptiles. #' http://esapubs.org/archive/ecol/E096/269/} #' -#' \href{http://creativecommons.org/publicdomain/zero/1.0/}{Creative Commons -#' 0}. To the extent possible under law, the authors have waived all copyright -#' and related or neighboring rights to this data. +#' Column names: +#' \itemize{ +#' \item class = The taxonomic class designation for the corresponding data entry; +#' \item order = The taxonomic order designation for the corresponding data entry; +#' \item family = The taxonomic family designation for the corresponding data entry; +#' \item genus = The taxonomic genus designation for the corresponding data entry; +#' \item species = The taxonomic species designation for the corresponding data entry; +#' \item subspecies = The taxonomic subspecies designation for the corresponding data entry; +#' \item common_name = The common name for the corresponding data entry; +#' \item female_maturity_d = The amount of time it takes for a female individual to reach maturity in days; +#' \item litter_or_clutch_size_n = The size of the litter/clutch; +#' \item litters_or_clutches_per_y = The number of litters/clutches produced per year; +#' \item adult_body_mass_g = The body mass of an adult individual in grams; +#' \item maximum_longevity_y = The longest lifespan reported of the species in years; +#' \item gestation_d = The time between conception and birth in days; +#' \item weaning_d = The amount of time it takes to wean the offspring in days; +#' \item birth_or_hatching_weight_g = The weight at birth/hatching in grams; +#' \item weaning_weight_g = The weight at weaning in grams; +#' \item egg_mass_g = The mass of the egg in grams; +#' \item fledging_age_d = The time between when the egg is laid and when it hatches in days; +#' \item incubation_d = The time it takes for the bird to be capable of flight (or for some species, leaving the nest) in days; +#' \item longevity_y = The lifespan of an individual in years; +#' \item male_maturity_d = The amount of time it takes for a male individual to reach maturity in days; +#' \item inter_litter_or_interbirth_interval_y = The time between the reproduction cycles in years; +#' \item female_body_mass_g = The body mass of a female individual in grams; +#' \item male_body_mass_g = The body mass of a male individual in grams; +#' \item no_sex_body_mass_g = The body mass of an individual of unreported sex in grams; +#' \item egg_width_mm = The width of the egg in millimeters; +#' \item egg_length_mm = The length of the egg in millimeters; +#' \item fledging_mass_g = The mass of a fledging in grams; +#' \item adult_svl_cm = The snout-to-vent length of an adult individual in centimeters; +#' \item male_svl_cm = The snout-to-vent length of a male individual in centimeters; +#' \item female_svl_cm = The snout-to-vent length of a female individual in centimeters; +#' \item birth_or_hatching_svl_cm = The snout-to-vent length of a newly-hatched individual in centimeters; +#' \item female_svl_at_maturity_cm = The snout-to-vent length of a female individual at maturity in centimeters; +#' \item female_body_mass_at_maturity_g = The body mass of a female individual at maturity in grams; +#' \item no_sex_svl_cm = The snout-to-vent length of an individual of unreported sex in centimeters; +#' \item no_sex_maturity_d = The amount of time it takes for an individual of unreported sex to reach maturity in days; +#' \item taxa = The taxonomic genus and species designation for the corresponding data entry; +#' } #' -#' @details Studying life-history traits within and across taxonomic +#' Description: +#' Studying life-history traits within and across taxonomic #' classifications has revealed many interesting and important patterns, but #' this approach to life history requires access to large compilations of data #' containing many different life-history parameters. Currently, life-history @@ -160,26 +205,41 @@ #' at least one life-history parameter for 21 322 species of birds, mammals, #' and reptiles. #' +#' @source \url{https://doi.org/10.6084/m9.figshare.c.3308127.v1}; +#' \href{http://creativecommons.org/publicdomain/zero/1.0/}{Creative Commons +#' 0}. To the extent possible under law, the authors have waived all copyright +#' and related or neighboring rights to this data. +#' #' @family rawdata "amniota" # ---------------------------------------------------------------------------- -#' PanTHERIA mammal traits +#' PanTHERIA 1.0 mammal traits #' -#' @description Here we describe a global species-level data set of key +#' @description A global species-level data set of key #' life-history, ecological and geographical traits of all known extant and #' recently extinct mammals (PanTHERIA) developed for a number of #' macroecological and macroevolutionary research projects. #' -#' @author Kate E. Jones, Jon Bielby, Marcel Cardillo, Susanne A. Fritz, Justin -#' O'Dell, C. David L. Orme, Kamran Safi, Wes Sechrest, Elizabeth H. Boakes, -#' Chris Carbone, Christina Connolly, Michael J. Cutts, Janine K. Foster, -#' Richard Grenyer, Michael Habib, Christopher A. Plaster, Samantha A. Price, -#' Elizabeth A. Rigby, Janna Rist, Amber Teacher, Olaf R. P. Bininda-Emonds, -#' John L. Gittleman, Georgina M. Mace, and Andy Purvis. +#' @details When using this data, please cite the original publication: +#' +#' \itemize{ \item E. Jones, Kate; Bielby, Jon; Cardillo, Marcel; A. Fritz, Susanne; O'Dell, +#' Justin; David L. Orme, C.; Safi, Kamran; Sechrest, Wes; H. Boakes, +#' Elizabeth; Carbone, Chris; Connolly, Christina; Cutts, Michael J.; Foster, +#' Janine K.; Grenyer, Richard; Habib, Michael; Plaster, Christopher A.; +#' Price, Samantha A.; Rigby, Elizabeth A.; Rist, Janna; Teacher, Amber; +#' Bininda-Emonds, Olaf R. P.; Gittleman, John L.; M. Mace, Georgina; Purvis, +#' Andy (2016): PanTHERIA: a species-level database of life history, ecology, +#' and geography of extant and recently extinct mammals. +#' http://esapubs.org/archive/ecol/E090/184/metadata.htm} + +#' +#' For column names details, please see original metadata at: +#' \url{http://esapubs.org/archive/ecol/E090/184/metadata.htm} +#' #' -#' @details Data were gathered from the literature for 25 types of ecological +#' Data were gathered from the literature for 25 types of ecological #' and life history information for any extant or recently extinct species #' within class Mammalia (100740 data lines): #' @@ -189,8 +249,7 @@ #' Habitat Layer; 13. Head-Body Length; 14. Interbirth Interval; 15. Litter #' size; 16. Litters Per Year; 17. Maximum Longevity; 18. Metabolic Rate; 19. #' Migratory Behaviour; 20. Mortality Data; 21. Population Density; 22. -#' Ranging Behaviour; 23. Sexual -#' Maturity Age; 24. Teat Number; and 25. Weaning Age. +#' Ranging Behaviour; 23. Sexual Maturity Age; 24. Teat Number; and 25. Weaning Age. #' #' 30 specific variables (see Class IV, Table 1) were extracted from the above #' data types for PanTHERIA from a total of 94729 data lines (before error @@ -201,28 +260,17 @@ #' see \url{http://esapubs.org/archive/ecol/E090/184/metadata.htm} for further #' information. #' -#' @source Cite as: -#' -#' E. Jones, Kate; Bielby, Jon; Cardillo, Marcel; A. Fritz, Susanne; O'Dell, -#' Justin; David L. Orme, C.; Safi, Kamran; Sechrest, Wes; H. Boakes, -#' Elizabeth; Carbone, Chris; Connolly, Christina; Cutts, Michael J.; Foster, -#' Janine K.; Grenyer, Richard; Habib, Michael; Plaster, Christopher A.; -#' Price, Samantha A.; Rigby, Elizabeth A.; Rist, Janna; Teacher, Amber; -#' Bininda-Emonds, Olaf R. P.; Gittleman, John L.; M. Mace, Georgina; Purvis, -#' Andy (2016): PanTHERIA: a species-level database of life history, ecology, -#' and geography of extant and recently extinct mammals. -#' \url{http://esapubs.org/archive/ecol/E090/184/metadata.htm}; -#' +#' @source \url{http://dx.doi.org/10.5061/dryad.53ds2}; #' \href{http://creativecommons.org/publicdomain/zero/1.0/}{Creative Commons #' 0}. To the extent possible under law, the authors have waived all copyright #' and related or neighboring rights to this data. #' -#' @family rawdata +#' @family rawdata "pantheria" # ---------------------------------------------------------------------------- -#' Mammal diet database +#' @title Mammal diet database #' #' @description A comprehensive global dataset of diet preferences of mammals #' (‘MammalDIET’). Diet information was digitized from the literature and @@ -230,27 +278,77 @@ #' extrapolated data cover species-level diet information for >99% of all #' terrestrial mammals. #' -#' @source Cite this dataset as: +#' @details When using this data, please cite the original publication: #' -#' - Kissling, W.D., Dalby, L., Fløjgaard, C., Lenoir, J., Sandel, B., Sandom, +#' \itemize{ \item Kissling, W.D., Dalby, L., Fløjgaard, C., Lenoir, J., Sandel, B., Sandom, #' C., Trøjelsgaard, K., Svenning, J. (2014). Establishing macroecological #' trait datasets: digitalization, extrapolation, and validation of diet -#' preferences in terrestrial mammals worldwide. Ecol Evol, 4, 2913–2930. -#' \url{http://onlinelibrary.wiley.com/doi/10.1002/ece3.1136/} +#' preferences in terrestrial mammals worldwide. Ecol Evol, 4, 2913–2930.} #' #' Additionally, please cite the Dryad data package: #' -#' - Kissling WD, Dalby L, Fløjgaard C, Lenoir J, Sandel B, Sandom C, +#' \itemize{ \item Kissling WD, Dalby L, Fløjgaard C, Lenoir J, Sandel B, Sandom C, #' Trøjelsgaard K, Svenning J-C (2014) Data from: Establishing macroecological #' trait datasets: digitalization, extrapolation, and validation of diet -#' preferences in terrestrial mammals worldwide. Dryad Digital Repository. -#' \url{https://doi.org/10.5061/dryad.6cd0v} +#' preferences in terrestrial mammals worldwide. Dryad Digital Repository +#' https://doi.org/10.5061/dryad.6cd0v} +#' +#' Column names: +#' \itemize{ +#' \item TaxonID = Unique numeric code for each species, starting with 1 and ending with 5364; +#' \item Order = The mammal order name of each species, following the IUCN taxonomy (IUCN 2013); +#' \item Family = The mammal family name of each species, following the IUCN taxonomy (IUCN 2013); +#' \item Genus = The mammal genus name of each species, following the IUCN taxonomy (IUCN 2013); +#' \item Species = The mammal species name, following the IUCN taxonomy (IUCN 2013); +#' \item Animal = Whether a mammal species eats animals (rank 1–3) or not (rank 0); +#' \item Vertebrate = Whether a mammal species eats vertebrates (1-3) or not (0); +#' \item Mammal = Whether a mammal species eats other mammals (rank 1–3) or not (rank 0); +#' \item Bird = Whether a mammal species eats birds (rank 1–3) or not (rank 0).; +#' \item Herptile = Whether a mammal species eats herptiles (amphibians or reptiles) (rank 1–3) or not (rank 0); +#' \item Fish = Whether a mammal species eats fish (rank 1–3) or not (rank 0); +#' \item Invertebrate = Whether a mammal species eats invertebrates (rank 1–3) or not (rank 0); +#' \item Plant = Whether a mammal species eats plants (rank 1–3) or not (rank 0).; +#' \item Seed = Whether a mammal species eats seeds (rank 1–3) or not (rank 0); +#' \item Fruit = Whether a mammal species eats fleshy fruits (rank 1–3) or not (rank 0); +#' \item Nectar = Whether a mammal species eats nectar (rank 1–3) or not (rank 0); +#' \item Root = Whether a mammal species eats roots (rank 1–3) or not (rank 0); +#' \item Leaf = Whether a mammal species eats leaves (rank 1–3) or not (rank 0); +#' \item Woody = Whether a mammal species eats leaves of woody plants (rank 1–3) or not (rank 0). +#' Allows the definition of browsers (as opposed to grazers); +#' \item Herbaceous = Whether a mammal species eats leaves of herbaceous plants (rank 1–3) or not (rank 0). +#' Allows the definition of grazers (as opposed to browsers); +#' \item Other = Whether a mammal species eats other plant material (rank 1–3) or not (rank 0). +#' Other plant material refers to plant food items that are not covered by the other plant categories +#' (e.g., buds, flowers, pollen, and gum). It also includes fungi and lichens; +#' \item TaxonomicNote = Information on synonyms (species, genus, family), i.e., differences in taxonomy between Nowak (1999) and IUCN (2013); +#' \item FillCode = Data extrapolation method for species without species-level diet information in Nowak (1999); +#' \item TrophicLevel = A classification of species into three trophic levels. Carnivore (predominantly eating animals); Herbivore (predominantly +#' eating plant material); Omnivore (feeding on both animals and plants); NotAssigned (species which do not fit in any of the previous categories); +#' \item MammalEater = Species with mammals as an important diet item; +#' \item Insectivore = Species with invertebrates as an important diet item; +#' \item Frugivore = Species with fruits as an important diet item; +#' \item Granivore = Species with seeds as an important diet item; +#' \item Folivore = Species with leaves as an important diet item; +#' \item DataSource = Whether data come from Nowak (1999), IUCN (2013), or whether they have been extrapolated; +#' \item taxa = Combination of Genus and Species name; +#' +#' Codes and definitions: +#' For Animal, Vertebrate, Mammal, Bird, Herptile, Fish, Invertebrate, Plant, Seed, +#' Fruit, Nectar, Root, Leaf, Woody, Herbaceous, Other: +#' 0 = does not eat x; +#' 1 = x is primary food item; +#' 2 = x is secondary food item; +#' 3 = x is occasional food item +#' +#' For MammalEater, Insectivore, Frugivore, Granivore, Folivore: +#' 1 = species with rank 1 in diet category x; +#' 0 = species without rank 1 in ‘Leaf’ +#' } #' -#' \href{http://creativecommons.org/publicdomain/zero/1.0/}{Creative Commons -#' 0}. To the extent possible under law, the authors have waived all copyright -#' and related or neighboring rights to this data. #' -#' @details Ecological trait data are essential for understanding the +#' +#' Description +#' Ecological trait data are essential for understanding the #' broad-scale distribution of biodiversity and its response to global change. #' For animals, diet represents a fundamental aspect of species’ evolutionary #' adaptations, ecological and functional roles, and trophic interactions. @@ -292,33 +390,201 @@ #' digitalization, extrapolation and validation procedures could be #' transferable to other trait data and taxa. #' -#' @author [Kissling, W.D.](danielkissling@web.de), Dalby, L., Fløjgaard, C., -#' Lenoir, J., Sandel, B., Sandom, C., Trøjelsgaard, K., Svenning, J. -#' +#' @source \url{http://dx.doi.org/10.5061/dryad.53ds2}; +#' \href{http://creativecommons.org/publicdomain/zero/1.0/}{Creative Commons +#' 0}. To the extent possible under law, the authors have waived all copyright +#' and related or neighboring rights to this data. +#' #' @family rawdata +#' "mammaldiet" # ----------------------------------------------------------------------------- -#' AmphiBIO, a global database for amphibian ecological traits +#' @title AmphiBIO, a global database for amphibian ecological traits #' #' @description A comprehensive database of natural history traits for amphibians worldwide. #' -#' @details Current ecological and evolutionary research are increasingly moving from species- to trait-based approaches because traits provide a stronger link to organism’s function and fitness. Trait databases covering a large number of species are becoming available, but such data remains scarce for certain groups. Amphibians are among the most diverse vertebrate groups on Earth, and constitute an abundant component of major terrestrial and freshwater ecosystems. They are also facing rapid population declines worldwide, which is likely to affect trait composition in local communities, thereby impacting ecosystem processes and services. In this context, we introduce AmphiBIO, a comprehensive database of natural history traits for amphibians worldwide. The database releases information on 17 traits related to ecology, morphology and reproduction features of amphibians. We compiled data from more than 1,500 literature sources, and for more than 6,500 species of all orders (Anura, Caudata and Gymnophiona), 61 families and 531 genera. This database has the potential to allow unprecedented large-scale analyses in ecology, evolution and conservation of amphibians. +#' @details When using this data, please cite the original publication: +#' +#' \itemize{ \item Oliveira, B.F., São-Pedro, V.A., Santos-Barrera, G., Penone, C. & Costa, G.C. (2017). +#' AmphiBIO, a global database for amphibian ecological traits. Scientific Data, 4:170123. +#' doi: [10.1038/sdata.2017.123](https://www.nature.com/articles/sdata2017123)} +#' +#' Additionally, please cite the data repository on figshare: +#' +#' \itemize{ \item Oliveira, Brunno Freire; São-Pedro, Vinícius Avelar; Santos-Barrera, Georgina; Penone, Caterina; +#' C. Costa, Gabriel (2017): AmphiBIO_v1. figshare. https://doi.org/10.6084/m9.figshare.4644424.v5} +#' +#' Column names: +#' \itemize{ +#' \item id = AmphiBIO species’ identification number; +#' \item Order = Amphibian Species of the World Order (Frost 2011); +#' \item Family = Amphibian Species of the World Family (Frost 2011); +#' \item Species = Amphibian Species of the World species scientific name (Frost 2011); +#' \item Fos, Ter, Aqua, Herb = Overall vertical foraging stratum classification. +#' 4 logical columns: Fos=Fossorial, Ter=Terrestrial, Aqua=Aquatic, Arb=Arboreal. +#' Ignores details about seasonal or ontogenetic changes; +#' \item Diet = Food items from the eating habits of adults using qualitative dietary categories. Information is based +#' on expert knowledge, direct observation or stomach content examination, as reported in the literature. +#' 6 logical columns: Leaves, Flowers, Seeds, Fruits, Arthro, Vert; +#' \item Diel = Overall diel period as active +#' 3 logical columns: Diu=Diurnal (i.e., active during the day), Noc=Nocturnal (i.e., active during the night) +#' Crepu=Crepuscular (i.e., active during the period immediately after dawn and that immediately before dusk); +#' \item Seasonality = Seasonal period as active. Based on the comparison of the precipitation (wet or dry) and temperature +#' (warm or cold) conditions when active in relation to the average climatic conditions over the year. +#' Climatic conditions were obtained from weather stations closer to localities where specimens were collected or to +#' field sites reported in publications (available at www.weatherbase.com) +#' 4 logical columns: Wet_warm, Wet_cold, Dry_warm, Dry_cold; +#' \item Body_mass_g = Maximum adult body mass; +#' \item Age_at_maturity_min_y = Minimum age at maturation/sexual maturity; +#' \item Age_at_maturity_max_y = Maximum age at maturation/sexual maturity; +#' \item Body_size_mm = Maximum adult body size. In Anura, body size is reported as snout to vent length (SVL). +#' In Gymnophiona and Caudata, body size is reported as total length (TL); +#' \item Size_at_maturity_min_mm = Minimum size at maturation/sexual maturity; +#' \item Size_at_maturity_max_mm = Maximum size at maturation/sexual maturity; +#' \item Longevity_max_y = Maximum life span; +#' \item Litter_size_min_n = Minimum no. of offspring or eggs per clutch; +#' \item Litter_size_max_n = Maximum no. of offspring or eggs per clutch; +#' \item Reproductive_output_y = Maximum no. reproduction events per year; +#' \item Offspring_size_min_mm = Minimum offspring or egg size; +#' \item Offspring_size_max_mm = Maximum offspring or egg size; +#' \item Breeding strategy = Whether the species reproduce via direct, larval development or is viviparous +#' 3 logical columns: Dir=Species reproduce via direct development, Lar=Species present larval stages Viv=Species is viviparous; +#' \item OBS = Comments +#' } +#' +#' Description: Current ecological and evolutionary research are increasingly moving from species- to trait-based approaches +#' because traits provide a stronger link to organism’s function and fitness. Trait databases covering a large number of +#' species are becoming available, but such data remains scarce for certain groups. Amphibians are among the most diverse +#' vertebrate groups on Earth, and constitute an abundant component of major terrestrial and freshwater ecosystems. They are +#' also facing rapid population declines worldwide, which is likely to affect trait composition in local communities, thereby +#' impacting ecosystem processes and services. In this context, we introduce AmphiBIO, a comprehensive database of natural +#' history traits for amphibians worldwide. The database releases information on 17 traits related to ecology, morphology and +#' reproduction features of amphibians. We compiled data from more than 1,500 literature sources, and for more than 6,500 species +#' of all orders (Anura, Caudata and Gymnophiona), 61 families and 531 genera. This database has the potential to allow unprecedented +#' large-scale analyses in ecology, evolution and conservation of amphibians. +#' +#' +#' @source \url{http://dx.doi.org/10.5061/dryad.53ds2}; +#' \href{https://creativecommons.org/licenses/by/4.0/}{Creative Commons BY 4.0}. You must give appropriate credit, +#' provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, +#' but not in any way that suggests the licensor endorses you or your use. +#' +#' @family rawdata +#' +"amphibio" + +# ----------------------------------------------------------------------------- +#' @title Passerine morphology +#' +#' @description Passerine morphology: external measurements of approximately one-quarter of passerine bird species. +#' +#' @details When using this data, please cite the original publication: +#' +#' \itemize{ \item Ricklefs, R. E. (2017), Passerine morphology: external measurements of approximately one-quarter of +#' passerine bird species. Ecology, 98: 1472. doi:10.1002/ecy.1783} +#' +#' Column names: +#' \itemize{ +#' \item Order/Sup = taxonomic Order; +#' \item Family = taxonomic Family; +#' \item Subfam = taxonomic Subfamily; +#' \item Genus = taxonomic Genus; +#' \item Species = taxonomic Species; +#' \item Length = total length of the specimen, including the bill and tail; +#' \item Wing = length of the folded wing, flattened along a stiff ruler, from the wrist to the tip of the longest primary; +#' \item Tail = length of the tail from the base of the feathers in the center of the tail to the tip of the longest rectrix; +#' \item Tarsus = length of the tarsus; +#' \item Toe = length of the middle toe (to the base of the claw); +#' \item Bill L = length of the beak: culmen from the tip of the upper mandible to its kinetic hinge at the front of the skull; +#' \item Bill W = width of the beak at the kinetic hinge; +#' \item Bill D = depth of the beak; +#' \item Taxonomy and distributon +#' 11 columns describing the distributions of species of Passeriformes in each of 11 biogeographic regions are from Edwards’s +#' Coded List of Birds of the World (1974). The biogeographic regions (column names) are HN = Nearctic, N = Neotropics, +#' NI = Neotropical Islands (primarily the West Indies), HP = Palearctic, E = Ethiopian (Africa), +#' EI = African Islands (primarily Madagascar), O = Oriental (southern Asia), OI = Oriental Islands, AU = Australia, +#' AZ = New Zealand, AI = Australasian Islands (including New Guinea and the southern Pacific). +#' Edwards’s checklist is out of date with respect to taxonomy, but provides detailed distributions of the species, whose +#' taxonomy was updated to match the Taxonomy in Flux Checklist. Edwards treats 5999 species of passerine birds, compared to +#' the 6198 species in the TiF checklist; +#' \item TIF No. = code from Taxonomy in Flux (TiF) Checklist, Version 2.5, updated August 17, 2009 (http://jboyd.net/Taxo/index.html); +#' \item IOC No. = code from Bird List of the International Ornithological Council (IOC), Version 4.4 (http://dx.doi.org/10.14344/IOC.ML.4.4); +#' } +#' +#' Description: A data set including 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. Taxonomy follows the Taxonomy in Flux (TIF) checklist as well as the World Bird +#' List of the International Ornithological Council. Geographic distributions are summarized from Edwards's Coded List of Birds of +#' the World. +#' +#' +#' @source \url{http://onlinelibrary.wiley.com/doi/10.1002/}; +#' \href{http://creativecommons.org/publicdomain/zero/1.0/}{Creative Commons +#' 0}. To the extent possible under law, the authors have waived all copyright +#' and related or neighboring rights to this data. +#' @family rawdata +#' +"passerine" + +# ----------------------------------------------------------------------------- + +#' D3: The Dispersal and Diaspore Database +#' +#' @description Baseline data and statistics on plant seed dispersal +#' +#' @details Seed dispersal is hard to measure, and there is still a lack of knowledge about dispersal-related traits of plant species. Therefore, we developed D3, the Dispersal and Diaspore Database (available at www.seed-dispersal.info), which aims at simplifying ecological and evolutionary analyses by providing and integrating various items related to seed dispersal: empirical studies, functional traits, image analyses and ranking indices (quantifying the adaptation to dispersal modes). #' #' @source Cite as: #' -#' - Oliveira, B.F., São-Pedro, V.A., Santos-Barrera, G., Penone, C. & Costa, G.C. (2017). AmphiBIO, a global database for amphibian ecological traits. Scientific Data, 4:170123. doi: [10.1038/sdata.2017.123](https://www.nature.com/articles/sdata2017123) +#' - Hintze, C., Heydel, F., Hoppe, C., Cunze, S., König, A., & Tackenberg, O. (2013). D3: the dispersal and diaspore database baseline data and statistics on seed dispersal. Perspectives in Plant Ecology Evolution and Systematics, 15(3):180-192.doi: [https://doi.org/10.1016/j.ppees.2013.02.001](http://www.sciencedirect.com/science/article/pii/S1433831913000218?via%3Dihub#sec0110) #' -#' Please also cite the data repository on figshare: +#' \href{https://creativecommons.org/licenses/by-nc-nd/3.0/}{Creative Commons BY-NC-ND 3.0}. You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use. NonCommercial: You may not use the material for commercial purposes. +#' NoDerivatives — If you remix, transform, or build upon the material, you may not distribute the modified material. #' -#' - Oliveira, Brunno Freire; São-Pedro, Vinícius Avelar; Santos-Barrera, Georgina; Penone, Caterina; C. Costa, Gabriel (2017): AmphiBIO_v1. figshare. \url{https://doi.org/10.6084/m9.figshare.4644424.v5} +#' @author Christina Hintze, Felix Heydel, Christina Hoppe, Sarah Cunze, Andreas König and Oliver Tackenberg +#' +#' @family rawdata +"plantsD3" + +# ----------------------------------------------------------------------------- + +#' Fire-related traits for vascular plant species of the Mediterranean Basin (BROT database) +#' +#' @description Most updated and comprehensive information on fire-related traits for vascular plant species of the Mediterranean Basin. +#' +#' @details Plant trait information is essential for understanding plant evolution, vegetation dynamics and vegetation responses to disturbance and management. Furthermore, in Mediterranean ecosystems, changes in fire regime may be more relevant than direct changes in climatic conditions, making the knowledge of fire-related traits specially relevant. +#' +#' @source Cite as: +#' +#' - Paula, S., Arianoutsou, M., Kazanis, D., Tavsanoglu, Ç., Lloret, F., Buhk, C., Ojeda, F., Luna, B., Moreno, J. M., Rodrigo, A., Espelta, J. M., Palacio, S., Fernández-Santos, B., Fernandes, P. M. and Pausas, J. G. (2009), Fire-related traits for plant species of the Mediterranean Basin. Ecology, 90: 1420. doi: [10.1890/08-1309.1] #' #' \href{https://creativecommons.org/licenses/by/4.0/}{Creative Commons BY 4.0}. You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use. #' -#' @author Brunno Freire Oliveira, Vinícius Avelar São-Pedro, Georgina Santos-Barrera, Caterina Penone, and Gabriel C. Costa +#' @author Paula, S., Arianoutsou, M., Kazanis, D., Tavsanoglu, Ç., Lloret, F., Buhk, C., Ojeda, F., Luna, B., Moreno, J. M., Rodrigo, A., Espelta, J. M., Palacio, S., Fernández-Santos, B., Fernandes, P. M. and Pausas, J. G. #' #' @family rawdata -#' @import readxl -"amphibio" +"plantsFire" + +# ----------------------------------------------------------------------------- +#' The thermal dependence of biological traits (biotraits) +#' +#' @description Dataset on how diverse biological rates and times respond to temperature. +#' +#' @details A dataset of 2352 thermal responses for 220 traits for microbes, plants, and animals compiled from 270 published sources. This represents the most diverse and comprehensive thermal response data set ever compiled. The traits in this database span levels of biological organization from internal physiology to species interactions and were measured in marine, freshwater, and terrestrial habitats for 411 species. +#' +#' @source Cite as: +#' +#' - Dell, A. I., Pawar, S. and Savage, V. M. (2013), The thermal dependence of biological traits. Ecology, 94: 1205–1206. doi: [10.1890/12-2060.1] +#' - I. Dell, Anthony; Pawar, Samraat; M. Savage, Van (2016): Data Paper. Data Paper. Wiley. https://doi.org/10.6084/m9.figshare.3556611.v1 Retrieved: 14:45, Nov 21, 2017 (GMT) +#' +#' \href{https://creativecommons.org/licenses/by/4.0/}{Creative Commons BY 4.0}. You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use. +#' +#' @author Dell, A. I., Pawar, S. and Savage, V. M. +#' +#' @family rawdata +"biotraits" \ No newline at end of file diff --git a/data/amniota.R b/data/amniota.R index da4959c..8a5f738 100644 --- a/data/amniota.R +++ b/data/amniota.R @@ -2,17 +2,149 @@ amniota <- utils::read.csv("http://esapubs.org/archive/ecol/E096/269/Data_Files/Amniote_Database_Aug_2015.csv", fileEncoding = "UTF-8") -attr(amniota, 'citeAs') <- utils::bibentry( - bibtype = "Article", - title = "An amniote life-history database to perform comparative analyses with birds, mammals, and reptiles", - journal = "Ecology", - volume = 96, - issue = 5, - pages = 3109, - author = c(utils::person(given = "Nathan P.", family = "Myhrvold" , email = "nathanm@intven.com"), utils::as.person(c("Elita Baldridge", "Benjamin Chan", "Dhileep Sivam", "Daniel L. Freeman", "S. K. Morgan Ernest")) - ), - year = 2015, - doi = "10.1890/15-0846.1" +amniota$taxa <- paste(amniota$genus, amniota$species) + +#replace -999 with NA +amniota[amniota == -999] <- NA + +attr(amniota, 'metadata') <- traitdataform::as.metadata( + datasetName = "Amniote life-history traits", + datasetID = "amniota", + bibliographicCitation = utils::bibentry( + bibtype = "Article", + title = "An amniote life-history database to perform comparative analyses with birds, mammals, and reptiles", + journal = "Ecology", + author = c(utils::as.person("Nathan P. Myhrvold, Elita Baldridge, Benjamin CHan, Dhileep Sivam, + Daniel L. Freeman, S.K. Morgan Ernest")), + year = 2015, + doi = "10.1890/15-0846.1" + ), + author = "Nathan P. Myhrvold", + license = "http://creativecommons.org/publicdomain/zero/1.0/" ) -print({cat("loading dataset 'amniota' from original data source! \n When using this data, please cite the original publication: \n") - (attributes(amniota)$citeAs) }) \ No newline at end of file + +attr(amniota, 'thesaurus') <- traitdataform::as.thesaurus( + female_maturity_d = traitdataform::as.trait("female_maturity_d", + expectedUnit = "d", valueType = "numeric", + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/#Development"), + + litter_or_clutch_size_n = traitdataform::as.trait("litter_or_clutch_size_n", + valueType = "numeric", + identifier = "http://t-sita.cesab.org/BETSI_vizInfo.jsp?trait=Clutch_length"), + + litters_or_clutches_per_y = traitdataform::as.trait("litters_or_clutches_per_y", + valueType = "numeric", + identifier = NA), + + adult_body_mass_g = traitdataform::as.trait("adult_body_mass_g", + expectedUnit = "g", valueType = "numeric", + identifier = "http://purl.obolibrary.org/obo/VT_0001259"), + + maximum_longevity_y = traitdataform::as.trait("maximum_longevity_y", + expectedUnit = "a", valueType = "numeric", + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/#Life_span_potential"), + + gestation_d = traitdataform::as.trait("gestation_d", + expectedUnit = "d", valueType = "numeric", + identifier = NA), + + weaning_d = traitdataform::as.trait("weaning_d", + expectedUnit = "d", valueType = "numeric", + identifier = NA), + + birth_or_hatching_weight_g = traitdataform::as.trait("birth_or_hatching_weight_g", + expectedUnit = "g", valueType = "numeric", + identifier = "http://purl.obolibrary.org/obo/VT_0001259"), + + weaning_weight_g = traitdataform::as.trait("weaning_weight_g", + expectedUnit = "g", valueType = "numeric", + identifier = "http://purl.obolibrary.org/obo/VT_0001259"), + + egg_mass_g = traitdataform::as.trait("egg_mass_g", + expectedUnit = "g", valueType = "numeric", + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/#Egg_biomass"), + + incubation_d = traitdataform::as.trait("incubation_d", + expectedUnit = "d", valueType = "numeric", + identifier = "https://ecologicaltraitdata.github.io/TraitDataList/#egg_development_time"), + + fledging_age_d = traitdataform::as.trait("fledging_age_d", + expectedUnit = "d", valueType = "numeric", + identifier = NA), + + longevity_y = traitdataform::as.trait("longevity_y", + expectedUnit = "a", valueType = "numeric", + identifier = "http://purl.obolibrary.org/obo/VT_0001661"), + + male_maturity_d = traitdataform::as.trait("male_maturity_d", + expectedUnit = "d", valueType = "numeric", + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/#Development"), + + inter_litter_or_interbirth_interval_y = traitdataform::as.trait("inter_litter_or_interbirth_interval_y", + expectedUnit = "a", valueType = "numeric", + identifier = NA), + + female_body_mass_g = traitdataform::as.trait("female_body_mass_g", + expectedUnit = "g", valueType = "numeric", + identifier = "http://purl.obolibrary.org/obo/VT_0001259"), + + male_body_mass_g = traitdataform::as.trait("male_body_mass_g", + expectedUnit = "g", valueType = "numeric", + identifier = "http://purl.obolibrary.org/obo/VT_0001259"), + + no_sex_body_mass_g = traitdataform::as.trait("no_sex_body_mass_g", + expectedUnit = "g", valueType = "numeric", + identifier = "http://purl.obolibrary.org/obo/VT_0001259"), + + egg_width_mm = traitdataform::as.trait("egg_width_mm", + expectedUnit = "mm", valueType = "numeric", + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/#Egg_size"), + + egg_length_mm = traitdataform::as.trait("egg_length_mm", + expectedUnit = "mm", valueType = "numeric", + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/#Egg_size"), + + fledging_mass_g = traitdataform::as.trait("fledging_mass_g", + expectedUnit = "g", valueType = "numeric", + identifier = "http://purl.obolibrary.org/obo/VT_0001259"), + + adult_svl_cm = traitdataform::as.trait("adult_svl_cm", + expectedUnit = "cm", valueType = "numeric", + identifier = "http://purl.obolibrary.org/obo/VT_0100005"), + + male_svl_cm = traitdataform::as.trait("male_svl_cm", + expectedUnit = "cm", valueType = "numeric", + identifier = "http://purl.obolibrary.org/obo/VT_0100005"), + + female_svl_cm = traitdataform::as.trait("female_svl_cm", + expectedUnit = "cm", valueType = "numeric", + identifier = "http://purl.obolibrary.org/obo/VT_0100005"), + + birth_or_hatching_svl_cm = traitdataform::as.trait("birth_or_hatching_svl_cm", + expectedUnit = "cm", valueType = "numeric", + identifier = "http://purl.obolibrary.org/obo/VT_0100005"), + + female_svl_at_maturity_cm = traitdataform::as.trait("female_svl_at_maturity_cm", + expectedUnit = "cm", valueType = "numeric", + identifier = "http://purl.obolibrary.org/obo/VT_0100005"), + + female_body_mass_at_maturity_g = traitdataform::as.trait("female_body_mass_at_maturity_g", + expectedUnit = "g", valueType = "numeric", + identifier = "http://purl.obolibrary.org/obo/VT_0001259"), + + no_sex_svl_cm = traitdataform::as.trait("no_sex_svl_cm", + expectedUnit = "cm", valueType = "numeric", + identifier = "http://purl.obolibrary.org/obo/VT_0100005"), + + no_sex_maturity_d = traitdataform::as.trait("no_sex_maturity_d", + expectedUnit = "d", valueType = "numeric", + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/#Development") +) + +attr(amniota, 'taxa') <- "taxa" + + +print(attributes(amniota)$metadata) + + + diff --git a/data/amphibio.R b/data/amphibio.R index 3863471..a0ffc1b 100644 --- a/data/amphibio.R +++ b/data/amphibio.R @@ -5,18 +5,131 @@ utils::unzip(temp, files = "AmphiBIO_v1.csv", exdir = ".") unlink(temp) rm(temp) -amphibio <- utils::read.csv("AmphiBIO_v1.csv") +amphibio <- utils::read.csv("AmphiBIO_v1.csv", fileEncoding = "latin1") file.remove("AmphiBIO_v1.csv") -attr(amphibio, 'citeAs') <- utils::bibentry( - bibtype = "Article", - title = "AmphiBIO, a global database for amphibian ecological traits", - journal = "Scientific Data", - volume = 4, - pages = 170123, - author = utils::as.person("Brunno Freire Oliveira, Vinícius Avelar São-Pedro, Georgina Santos-Barrera, Caterina Penone, and Gabriel C. Costa"), - year = 2017, - doi = "10.1038/sdata.2017.123" +attr(amphibio, 'metadata') <- traitdataform::as.metadata( + datasetName = "AmphiBIO", + datasetID = "amphibio", + bibliographicCitation = utils::bibentry( + bibtype = "Article", + title = "AmphiBIO, a global database for amphibian ecological traits", + journal = "Scientific Data", + volume = 4, + pages = 170123, + author = utils::as.person("Brunno Freire Oliveira, Vinícius Avelar São-Pedro, + Georgina Santos-Barrera, Caterina Penone, and Gabriel C. Costa"), + year = 2017, + doi = "10.1038/sdata.2017.123" + ), + author = "Brunno Freire Oliveira", + license = "http://creativecommons.org/publicdomain/zero/1.0/" ) -print({cat("loading dataset 'amphibio' from original data source! \n When using this data, please cite the original publication: \n") - (attributes(amphibio)$citeAs) }) + +attr(amphibio, 'thesaurus') <- traitdataform::as.thesaurus( + Fos = traitdataform::as.trait("Fossorial", + expectedUnit = NA, valueType = "logical", + identifier = NA), + Ter = traitdataform::as.trait("Terrestrial", + expectedUnit = NA, valueType = "logical", + identifier = NA), + Aqu = traitdataform::as.trait("Aquatic", + expectedUnit = NA, valueType = "logical", + identifier = NA), + Arb = traitdataform::as.trait("Arboreal", + expectedUnit = NA, valueType = "logical", + identifier = NA), + + Leaves = traitdataform::as.trait("Leaves", + expectedUnit = NA, valueType = "logical", + identifier = NA), + Flowers = traitdataform::as.trait("Flowers", + expectedUnit = NA, valueType = "logical", + identifier = NA), + Seeds = traitdataform::as.trait("Seeds", + expectedUnit = NA, valueType = "logical", + identifier = NA), + Fruits = traitdataform::as.trait("Fruits", + expectedUnit = NA, valueType = "logical", + identifier = NA), + Arthro = traitdataform::as.trait("Arthro", + expectedUnit = NA, valueType = "logical", + identifier = NA), + + Diu = traitdataform::as.trait("Diurnal", + expectedUnit = NA, valueType = "logical", + identifier = "http://purl.obolibrary.org/obo/VT_0001502"), + Noc = traitdataform::as.trait("Nocturnal", + expectedUnit = NA, valueType = "logical", + identifier = "http://purl.obolibrary.org/obo/VT_0001502"), + Crepu = traitdataform::as.trait("Crepuscular", + expectedUnit = NA, valueType = "logical", + identifier = "http://purl.obolibrary.org/obo/VT_0001502"), + + Wet_warm = traitdataform::as.trait("Wet_warm_season", + expectedUnit = NA, valueType = "logical", + identifier = NA), + Wet_cold = traitdataform::as.trait("Wet_cold_season", + expectedUnit = NA, valueType = "logical", + identifier = NA), + Dry_warm = traitdataform::as.trait("Dry_warm_season", + expectedUnit = NA, valueType = "logical", + identifier = NA), + Dry_cold = traitdataform::as.trait("Dry_cold_season", + expectedUnit = NA, valueType = "logical", + identifier = NA), + + Body_mass_g = traitdataform::as.trait("Body_mass_g", + expectedUnit = "g", valueType = "numeric", + identifier = "http://purl.obolibrary.org/obo/VT_0001259"), + Age_at_maturity_min_y = traitdataform::as.trait("Age_at_maturity_min_y", + expectedUnit = "a", valueType = "numeric", + identifier = "https://ecologicaltraitdata.github.io/TraitDataList/#Age_at_maturity"), + Age_at_maturity_max_y = traitdataform::as.trait("Age_at_maturity_max_y", + expectedUnit = "a", valueType = "numeric", + identifier = "https://ecologicaltraitdata.github.io/TraitDataList/#Age_at_maturity"), + Body_size_mm = traitdataform::as.trait("Body_size_mm", + expectedUnit = "mm", valueType = "numeric", + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/#Body_length"), + Size_at_maturity_min_mm = traitdataform::as.trait("Size_at_maturity_min_mm", + expectedUnit = "mm", valueType = "numeric", + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/#Body_length"), + Size_at_maturity_max_mm = traitdataform::as.trait("Size_at_maturity_max_mm", + expectedUnit = "mm", valueType = "numeric", + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/#Body_length"), + Longevity_max_y = traitdataform::as.trait("Longevity_max_y", + expectedUnit = "a", valueType = "numeric", + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/#Life_span_potential"), + Litter_size_min_n = traitdataform::as.trait("Litter_size_min_n", + expectedUnit = NA, valueType = "numeric", + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/#Clutch_size"), + Litter_size_max_n = traitdataform::as.trait("Litter_size_max_n", + expectedUnit = NA, valueType = "numeric", + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/#Clutch_size"), + Reproductive_output_y = traitdataform::as.trait("Reproductive_output_y", + expectedUnit = "a", valueType = "numeric", + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/#Fecundity"), + Offspring_size_min_mm = traitdataform::as.trait("Offspring_size_min_mm", + expectedUnit = "mm", valueType = "numeric", + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/#Reproduction_mode"), + Offspring_size_max_mm = traitdataform::as.trait("Offspring_size_max_mm", + expectedUnit = "mm", valueType = "numeric", + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/#Reproduction_mode"), + + Dir = traitdataform::as.trait("Direct_development", + expectedUnit = NA, valueType = "logical", + identifier = NA), + Lar = traitdataform::as.trait("Larval__development", + expectedUnit = NA, valueType = "logical", + identifier = NA), + Viv = traitdataform::as.trait("Viviparous_development", + expectedUnit = NA, valueType = "logical", + identifier = NA) +) + +attr(amphibio, 'taxa') <- "Species" +attr(amphibio, 'keep') <- c(measurementRemarks = "OBS", basisOfRecord = "literatureData") + + +print(attributes(amphibio)$metadata) + diff --git a/data/arthropodtraits.R b/data/arthropodtraits.R index 9087b47..bb1ef54 100644 --- a/data/arthropodtraits.R +++ b/data/arthropodtraits.R @@ -5,17 +5,60 @@ arthropodtraits <- utils::read.csv("http://datadryad.org/bitstream/handle/10255/ fileEncoding = "latin1" ) -attr(arthropodtraits, 'citeAs') <- utils::bibentry( - bibtype = "Article", - title = "A summary of eight traits of Coleoptera, Hemiptera, Orthoptera and Araneae, occurring in grasslands in Germany.", - journal = "Scientific Data", - volume = 2, - pages = 150013, - author = c(utils::as.person("Martin M Gossner , Nadja K Simons, R Achtziger, T Blick, WHO Dorow, F Dziock, F Köhler, W Rabitsch, Wolfgang W Weisser") +attr(arthropodtraits, 'metadata') <- traitdataform::as.metadata( + datasetName = "Functional Arthropod Traits", + datasetID = "arthropodtraits", + bibliographicCitation = utils::bibentry( + bibtype = "Article", + title = "A summary of eight traits of Coleoptera, Hemiptera, Orthoptera and Araneae, occurring in grasslands in Germany.", + journal = "Scientific Data", + volume = 2, + pages = 150013, + author = c(utils::as.person("Martin M Gossner , Nadja K Simons, R Achtziger, T Blick, WHO Dorow, F Dziock, F Köhler, W Rabitsch, Wolfgang W Weisser") + ), + year = 2015, + doi = "10.1038/sdata.2015.13" ), - year = 2015, - doi = "10.1038/sdata.2015.13" + author = "Martin M Gossner", + license = "http://creativecommons.org/publicdomain/zero/1.0/" ) -print({cat("loading dataset 'arthropodtraits' from original data source! \n When using this data, please cite the original publication: \n") - (attributes(arthropodtraits)$citeAs) }) +attr(arthropodtraits, 'thesaurus') <- traitdataform::as.thesaurus( + Body_Size = traitdataform::as.trait("Body_Size", + expectedUnit = "mm", valueType = "numeric", + identifier = "http://t-sita.cesab.org/BETSI_vizInfo.jsp?trait=Body_length"), + Dispersal_ability = traitdataform::as.trait("Dispersal_ability", + expectedUnit = "unitless", valueType = "integer", + identifier = "https://www.nature.com/articles/sdata201513"), + Feeding_guild = traitdataform::as.trait("Feeding_guild", + expectedUnit = "unitless", valueType = "factor", + identifier = "https://www.nature.com/articles/sdata201513"), + Feeding_guild_short = traitdataform::as.trait("Feeding_guild_short", + expectedUnit = "unitless", valueType = "factor", + identifier = "https://www.nature.com/articles/sdata201513"), + Feeding_mode = traitdataform::as.trait("Feeding_mode", + expectedUnit = "unitless", valueType = "factor", + identifier = "https://www.nature.com/articles/sdata201513"), + Feeding_specialization = traitdataform::as.trait("Feeding_specialization", + expectedUnit = "unitless", valueType = "factor", + identifier = "https://www.nature.com/articles/sdata201513"), + Feeding_tissue = traitdataform::as.trait("Feeding_tissue", + expectedUnit = "unitless", valueType = "factor", + identifier = "https://www.nature.com/articles/sdata201513"), + Feeding_plant_part = traitdataform::as.trait("Feeding_plant_part", + expectedUnit = "unitless", valueType = "factor", + identifier = "https://www.nature.com/articles/sdata201513"), + Endophagous_lifestyle = traitdataform::as.trait("Endophagous_lifestyle", + expectedUnit = "unitless", valueType = "factor", + identifier = "https://www.nature.com/articles/sdata201513"), + Stratum_use = traitdataform::as.trait("Stratum_use", + expectedUnit = "unitless", valueType = "factor", + identifier = "https://www.nature.com/articles/sdata201513"), + Stratum_use_short = traitdataform::as.trait("Stratum_use_short", + expectedUnit = "unitless", valueType = "factor", + identifier = "https://www.nature.com/articles/sdata201513") +) + + +attr(arthropodtraits, 'taxa') <- "SpeciesID" +attr(arthropodtraits, 'keep') <- c(basisOfRecord = "literatureData", measurementRemarks = "Remark") diff --git a/data/biotraits.R b/data/biotraits.R new file mode 100644 index 0000000..6b7b252 --- /dev/null +++ b/data/biotraits.R @@ -0,0 +1,22 @@ + +temp <- tempfile(fileext = ".zip") +utils::download.file("https://ndownloader.figshare.com/articles/3556611/versions/1", temp, method = "auto", quiet = TRUE, mode="wb") +utils::unzip(temp, files = "TempTrait_001.txt", exdir = ".") +unlink(temp) +rm(temp) + +biotraits <- utils::read.table("TempTrait_001.txt", header = T, fileEncoding = "UCS-2LE", sep="\t", fill=T) +file.remove("TempTrait_001.txt") + +attr(biotraits, 'citeAs') <- utils::bibentry( + bibtype = "Article", + title = "The thermal dependence of biological traits", + journal = "Ecology", + volume = 94, + pages = 1205-1206, + author = utils::as.person("l, A. I., Pawar, S. and Savage, V. M."), + year = 2013, + doi = "10.1890/12-2060.1" +) +print({cat("loading dataset 'biotraits' from original data source! \n When using this data, please cite the original publication: \n") + (attributes(biotraits)$citeAs) }) \ No newline at end of file diff --git a/data/heteroptera.R b/data/heteroptera.R index 0141be5..de7d4bc 100644 --- a/data/heteroptera.R +++ b/data/heteroptera.R @@ -6,17 +6,48 @@ heteroptera <- utils::read.csv("http://www.esapubs.org/archive/ecol/E096/102/Het fileEncoding = "latin1" ) -attr(heteroptera, 'citeAs') <- utils::bibentry( - bibtype = "Article", - title = "Morphometric measures of Heteroptera sampled in grasslands across three regions of Germany", - journal = "Ecology", - volume = 96, - issue = 4, - pages = 1154, - author = c(utils::as.person("Martin M. Gossner , Nadja K. Simons, Leonhard Höck, Wolfgang W. Weisser") - ), - year = 2015, - doi = "10.1890/14-2159.1" +attr(heteroptera, 'metadata') <- traitdataform::as.metadata( + datasetName = "Heteroptera morphometry traits", + datasetID = "heteroptera", + bibliographicCitation = utils::bibentry( + bibtype = "Article", + title = "Morphometric measures of Heteroptera sampled in grasslands across three regions of Germany", + journal = "Ecology", + volume = 96, + issue = 4, + pages = 1154, + author = c(utils::as.person("Martin M. Gossner , Nadja K. Simons, Leonhard Höck, Wolfgang W. Weisser")), + year = 2015, + doi = "10.1890/14-2159.1" + ), + author = "Martin M. Gossner", + license = "http://creativecommons.org/publicdomain/zero/1.0/" ) -print({cat("loading dataset 'heteroptera' from original data source! \n When using this data, please cite the original publication: \n") - (attributes(heteroptera)$citeAs) }) + + +attr(heteroptera, 'thesaurus') <- traitdataform::as.thesaurus( + Body_length = traitdataform::as.trait("Body_length", expectedUnit = "mm", valueType = "numeric", + identifier = "http://t-sita.cesab.org/BETSI_vizInfo.jsp?trait=Body_length"), + Body_volume = traitdataform::as.trait("Body_volume", expectedUnit = "mm3", valueType = "numeric", + identifier = " http://t-sita.cesab.org/BETSI_vizInfo.jsp?trait=Body_dimension"), + Rel_wing_length = traitdataform::as.trait("Rel_wing_length", expectedUnit = "unitless", valueType = "numeric", + identifier = " http://ecologicaltraitdata.github.io/TraitDataList/Wing_size_relation"), + Hind.Femur_shape = traitdataform::as.trait("Hind.Femur_shape", expectedUnit = "unitless", valueType = "numeric", + identifier = NA), + Rel_Hind.Femur_length = traitdataform::as.trait("Rel_Hind.Femur_length", expectedUnit = "unitless", valueType = "numeric", + identifier = "http://t-sita.cesab.org/BETSI_vizInfo.jsp?trait=Femur_length"), + Rel_Rostrum_length = traitdataform::as.trait("Rel_Rostrum_length", expectedUnit = "unitless", valueType = "numeric", + identifier = NA), + Front.Femur_shape = traitdataform::as.trait("Front.Femur_shape", expectedUnit = "unitless", valueType = "numeric", + identifier = NA), + Rel_eye_size = traitdataform::as.trait("Rel_eye_size", expectedUnit = "unitless", valueType = "numeric", + identifier = NA), + Rel_Antenna_length = traitdataform::as.trait("Rel_Antenna_length", expectedUnit = "unitless", valueType = "numeric", + identifier = NA) +) + + +attr(heteroptera, 'taxa') <- "SpeciesID" +attr(heteroptera, 'keep') <- c(basisOfRecord = "PreservedSpecimen") + +print(attributes(heteroptera)$metadata) diff --git a/data/heteroptera_raw.R b/data/heteroptera_raw.R index 4a1f7b0..49b62b8 100644 --- a/data/heteroptera_raw.R +++ b/data/heteroptera_raw.R @@ -11,18 +11,77 @@ heteroptera_raw$Center_Sampling_region <- iconv(heteroptera_raw$Center_Sampling_ heteroptera_raw$Voucher_ID <- iconv(heteroptera_raw$Voucher_ID, to = "UTF-8") heteroptera_raw$Source <- iconv(heteroptera_raw$Source, to = "UTF-8") -attr(heteroptera_raw, 'citeAs') <- utils::bibentry( - bibtype = "Article", - title = "Morphometric measures of Heteroptera sampled in grasslands across three regions of Germany", - journal = "Ecology", - volume = 96, - issue = 4, - pages = 1154, - author = c(utils::as.person("Martin M. Gossner , Nadja K. Simons, Leonhard Höck, Wolfgang W. Weisser") +attr(heteroptera_raw, 'metadata') <- traitdataform::as.metadata( + datasetName = "Heteroptera morphometry traits", + datasetID = "heteroptera", + bibliographicCitation = utils::bibentry( + bibtype = "Article", + title = "Morphometric measures of Heteroptera sampled in grasslands across three regions of Germany", + journal = "Ecology", + volume = 96, + issue = 4, + pages = 1154, + author = c(utils::as.person("Martin M. Gossner , Nadja K. Simons, Leonhard Höck, Wolfgang W. Weisser")), + year = 2015, + doi = "10.1890/14-2159.1" ), - year = 2015, - doi = "10.1890/14-2159.1" + author = "Martin M. Gossner", + license = "http://creativecommons.org/publicdomain/zero/1.0/" ) -print({cat("loading dataset 'heteroptera_raw' from original data source! \n When using this data, please cite the original publication: \n") - (attributes(heteroptera_raw)$citeAs) }) +attr(heteroptera_raw, 'thesaurus') <- traitdataform::as.thesaurus( + Wing_development = traitdataform::as.trait("Wing_development", expectedUnit = "unitless", valueType = "factor", + identifier = "http://t-sita.cesab.org/BETSI_vizInfo.jsp?trait=Wing_development"), + Body_length = traitdataform::as.trait("Body_length", expectedUnit = "mm", valueType = "numeric", + identifier = "http://t-sita.cesab.org/BETSI_vizInfo.jsp?trait=Body_length"), + Body_width = traitdataform::as.trait("Body_width", expectedUnit = "mm", valueType = "numeric", + identifier = "http://t-sita.cesab.org/BETSI_vizInfo.jsp?trait=Body_width"), + Body_height = traitdataform::as.trait("Body_height", expectedUnit = "mm", valueType = "numeric", + identifier = "http://t-sita.cesab.org/BETSI_vizInfo.jsp?trait=Body_width"), + Thorax_length = traitdataform::as.trait("Thorax_length", expectedUnit = "mm", valueType = "numeric", + identifier = "http://t-sita.cesab.org/BETSI_vizInfo.jsp?trait=Body_length"), + Thorax_width = traitdataform::as.trait("Thorax_width", expectedUnit = "mm", valueType = "numeric", + identifier = "http://t-sita.cesab.org/BETSI_vizInfo.jsp?trait=Body_width"), + Head_width = traitdataform::as.trait("Head_width", expectedUnit = "mm", valueType = "numeric", + identifier = "http://t-sita.cesab.org/BETSI_vizInfo.jsp?trait=Body_width"), + Eye_width = traitdataform::as.trait("Eye_width", expectedUnit = "mm", valueType = "numeric", + identifier = "http://t-sita.cesab.org/BETSI_vizInfo.jsp?trait=Eye_diameter"), + Antenna_Seg1 = traitdataform::as.trait("Antenna_Seg1", expectedUnit = "mm", valueType = "numeric", + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/#Antenna_length"), + Antenna_Seg2 = traitdataform::as.trait("Antenna_Seg2", expectedUnit = "mm", valueType = "numeric", + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/#Antenna_length"), + Antenna_Seg3 = traitdataform::as.trait("Antenna_Seg3", expectedUnit = "mm", valueType = "numeric", + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/#Antenna_length"), + Antenna_Seg4 = traitdataform::as.trait("Antenna_Seg4", expectedUnit = "mm", valueType = "numeric", + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/#Antenna_length"), + Antenna_Seg5 = traitdataform::as.trait("Antenna_Seg5", expectedUnit = "mm", valueType = "numeric", + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/#Antenna_length"), + Front.Tibia_length = traitdataform::as.trait("Front.Tibia_length", expectedUnit = "mm", valueType = "numeric", + identifier = " http://t-sita.cesab.org/BETSI_vizInfo.jsp?trait=Body_width"), + Mid.Tibia_length = traitdataform::as.trait("Mid.Tibia_length", expectedUnit = "mm", valueType = "numeric", + identifier = "http://t-sita.cesab.org/BETSI_vizInfo.jsp?trait=Tibia_length"), + Hind.Tibia_length = traitdataform::as.trait("Hind.Tibia_length", expectedUnit = "mm", valueType = "numeric", + identifier = "http://t-sita.cesab.org/BETSI_vizInfo.jsp?trait=Tibia_length"), + Front.Femur_length = traitdataform::as.trait("Front.Femur_length", expectedUnit = "mm", valueType = "numeric", + identifier = "http://t-sita.cesab.org/BETSI_vizInfo.jsp?trait=Femur_length"), + Hind.Femur_length = traitdataform::as.trait("Hind.Femur_length", expectedUnit = "mm", valueType = "numeric", + identifier = "http://t-sita.cesab.org/BETSI_vizInfo.jsp?trait=Femur_length"), + Front.Femur_width = traitdataform::as.trait("Front.Femur_width", expectedUnit = "mm", valueType = "numeric", + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/#Femur_width"), + Hind.Femur_width = traitdataform::as.trait("Hind.Femur_width", expectedUnit = "mm", valueType = "numeric", + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/#Femur_width"), + Rostrum_length = traitdataform::as.trait("Rostrum_length", expectedUnit = "mm", valueType = "numeric", + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/#Nutrition_morphology"), + Rostrum_width = traitdataform::as.trait("Rostrum_width", expectedUnit = "mm", valueType = "numeric", + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/#Nutrition_morphology"), + Wing_length = traitdataform::as.trait("Wing_length", expectedUnit = "mm", valueType = "numeric", + identifier = "http://t-sita.cesab.org/BETSI_vizInfo.jsp?trait=Wing"), + Wing_width = traitdataform::as.trait("Wing_width", expectedUnit = "mm", valueType = "numeric", + identifier = "http://t-sita.cesab.org/BETSI_vizInfo.jsp?trait=Wing") +) + + +attr(heteroptera_raw, 'taxa') <- "SpeciesID" +attr(heteroptera_raw, 'keep') <- c(basisOfRecord = "PreservedSpecimen", references="Author", sex="Sex", + references = "Source", measurementRemarks = "Voucher_ID", + measurementID = "ID") diff --git a/data/mammaldiet.R b/data/mammaldiet.R index 60a7bb3..607c928 100644 --- a/data/mammaldiet.R +++ b/data/mammaldiet.R @@ -3,19 +3,54 @@ mammaldiet <- utils::read.csv("http://datadryad.org/bitstream/handle/10255/dryad.64565/MammalDIET_v1.0.txt?sequence=1", sep = "\t", fileEncoding = "UTF-8" - ) +) + +mammaldiet$taxa <- paste(mammaldiet$Genus, mammaldiet$Species) + +attr(mammaldiet, 'metadata') <- traitdataform::as.metadata( + datasetName = "Mammal diet database", + datasetID = "mammaldiet", + bibliographicCitation = utils::bibentry( + bibtype = "Article", + title = "Establishing macroecological trait datasets: digitalization, extrapolation, and validation of diet preferences in terrestrial mammals worldwide", + journal = "Ecology and Evolution", + author = c(utils::as.person("Wilm Daniel Kissling, Lars Dalby, Camilla Fløjgaard, Jonathan Lenoir, Brody Sandel, + Christopher Sandom, Kristian Trøjelsgaard, Jens-Christian Svenning")), + year = 2014, + doi = "10.1002/ece3.1136" + ), + author = "Wilm Daniel Kissling", + license = "http://creativecommons.org/publicdomain/zero/1.0/" +) -attr(mammaldiet, 'citeAs') <- utils::bibentry( - bibtype = "Article", - title = "Establishing macroecological trait datasets: digitalization, extrapolation, and validation of diet preferences in terrestrial mammals worldwide", - journal = "Ecology and Evolution", - volume = 4, - issue = 12, - pages = 2913-2930, - author = c(utils::person(given = "Wilm Daniel", family = "Kissling", email = "danielkissling@web.de") - ), - year = 2014, - doi = "10.1002/ece3.1136" +attr(mammaldiet, 'thesaurus') <- traitdataform::as.thesaurus( + diet_Animal = traitdataform::as.trait("diet_Animal", valueType = "integer"), + diet_Vertebrate = traitdataform::as.trait("diet_Vertebrate", valueType = "integer"), + diet_Mammal = traitdataform::as.trait("diet_Mammal", valueType = "integer"), + diet_Bird = traitdataform::as.trait("diet_Bird", valueType = "integer"), + diet_Herptile = traitdataform::as.trait("diet_Herptile", valueType = "integer"), + diet_Fish = traitdataform::as.trait("diet_Fish", valueType = "integer"), + diet_Invertebrate = traitdataform::as.trait("diet_Invertebrate", valueType = "integer"), + diet_Plant = traitdataform::as.trait("diet_Plant", valueType = "integer"), + diet_Seed = traitdataform::as.trait("diet_Seed", valueType = "integer"), + diet_Fruit = traitdataform::as.trait("diet_Fruit", valueType = "integer"), + diet_Nectar = traitdataform::as.trait("diet_Nectar", valueType = "integer"), + diet_Root = traitdataform::as.trait("diet_Root", valueType = "integer"), + diet_Leaf = traitdataform::as.trait("diet_Leaf", valueType = "integer"), + diet_Woody = traitdataform::as.trait("diet_Woody", valueType = "integer"), + diet_Herbaceous = traitdataform::as.trait("diet_Herbaceous", valueType = "integer"), + diet_Other = traitdataform::as.trait("diet_Other", valueType = "integer"), + + TrophicLevel = traitdataform::as.trait("TrophicLevel", valueType = "factor"), + + diet_guild_MammalEater = traitdataform::as.trait("diet_guild_MammalEater", valueType = "logical"), + diet_guild_Insectivore = traitdataform::as.trait("diet_guild_Insectivore", valueType = "logical"), + diet_guild_Frugivore = traitdataform::as.trait("diet_guild_Frugivore", valueType = "logical"), + diet_guild_Granivore = traitdataform::as.trait("diet_guild_Granivore", valueType = "logical"), + diet_guild_Folivore = traitdataform::as.trait("diet_guild_Folivore", valueType = "logical") ) -print({cat("loading dataset 'mammaldiet' from original data source! \n When using this data, please cite the original publication: \n") - (attributes(mammaldiet)$citeAs) }) + +attr(mammaldiet, 'taxa') <- "taxa" +attr(mammaldiet, 'keep') <- c(datasetID = "DataSource", measurementRemarks = "note") + +print(attributes(mammaldiet)$metadata) diff --git a/data/pantheria.R b/data/pantheria.R index a6261e4..076bbc3 100644 --- a/data/pantheria.R +++ b/data/pantheria.R @@ -3,16 +3,141 @@ pantheria <- utils::read.csv("http://esapubs.org/archive/ecol/E090/184/PanTHERIA_1-0_WR05_Aug2008.txt", sep = "\t", fileEncoding = "UTF-8") -attr(pantheria, 'citeAs') <- utils::bibentry( +attr(pantheria, 'metadata') <- traitdataform::as.metadata( + datasetName = "PanTHERIA 1.0", + datasetID = "pantheria", + bibliographicCitation = utils::bibentry( bibtype = "Article", title = "PanTHERIA: a species-level database of life history, ecology, and geography of extant and recently extinct mammals", journal = "Ecology", volume = 90, pages = 2648, - author = c(utils::person(given = "Kate E.", family = "Jones", email = "Kate.Jones@ioz.ac.uk"), utils::as.person("Jon Bielby, Marcel Cardillo, Susanne A. Fritz, Justin O'Dell, C. David L. Orme, Kamran Safi, Wes Sechrest, Elizabeth H. Boakes, Chris Carbone, Christina Connolly, Michael J. Cutts, Janine K. Foster, Richard Grenyer, Michael Habib, Christopher A. Plaster, Samantha A. Price, Elizabeth A. Rigby, Janna Rist, Amber Teacher, Olaf R. P. Bininda-Emonds, John L. Gittleman, Georgina M. Mace, and Andy Purvis") + author = c(utils::person(given = "Kate E.", family = "Jones", email = "Kate.Jones@ioz.ac.uk"), + utils::as.person("Jon Bielby, Marcel Cardillo, Susanne A. Fritz, Justin O'Dell, C. David L. Orme, + Kamran Safi, Wes Sechrest, Elizabeth H. Boakes, Chris Carbone, Christina Connolly, + Michael J. Cutts, Janine K. Foster, Richard Grenyer, Michael Habib, Christopher A. Plaster, + Samantha A. Price, Elizabeth A. Rigby, Janna Rist, Amber Teacher, Olaf R. P. Bininda-Emonds, + John L. Gittleman, Georgina M. Mace, and Andy Purvis") ), year = 2009, doi = "10.1890/08-1494.1" +), +author = "Kate E. Jones", +license = "http://creativecommons.org/publicdomain/zero/1.0/" ) -print({cat("loading dataset 'pantheria' from original data source! \n When using this data, please cite the original publication: \n") - (attributes(pantheria)$citeAs) }) + +attr(pantheria, 'thesaurus') <- traitdataform::as.thesaurus( + X1.1_ActivityCycle = traitdataform::as.trait("Activity_Cycle", expectedUnit = NA, + identifier = "http://purl.obolibrary.org/obo/VT_0001502", + valueType = "factor"), + X5.1_AdultBodyMass_g = traitdataform::as.trait("Adult_Body_Mass_g", expectedUnit = "g", + identifier = "http://purl.obolibrary.org/obo/VT_0001259", + valueType = "numeric"), + X8.1_AdultForearmLen_mm = traitdataform::as.trait("Adult_Forearm_Length_mm", expectedUnit = "mm", + valueType = "numeric"), + X13.1_AdultHeadBodyLen_mm = traitdataform::as.trait("Adult_Body_Length_mm", expectedUnit = "mm", + identifier = "https://ecologicaltraitdata.github.io/TraitDataList/#Body_size", + valueType = "numeric"), + X2.1_AgeatEyeOpening_d = traitdataform::as.trait("Age_at_Eye_Opening_d", expectedUnit = "d", + valueType = "numeric"), + X3.1_AgeatFirstBirth_d = traitdataform::as.trait("Age_First_Birth_d", expectedUnit = "d", + identifier = "https://ecologicaltraitdata.github.io/TraitDataList/#Age_at_reproduction", + valueType = "numeric"), + X18.1_BasalMetRate_mLO2hr = traitdataform::as.trait("Basal_Metabolic_Rate_mLO2hr", expectedUnit = "mL.O2/hr", + valueType = "numeric"), + X5.2_BasalMetRateMass_g = traitdataform::as.trait("Basal_Metabolic_Rate_Mass_g", expectedUnit = "g", + valueType = "numeric"), + X6.1_DietBreadth = traitdataform::as.trait("Diet_Breadth", expectedUnit = NA, + valueType = "integer"), + X7.1_DispersalAge_d = traitdataform::as.trait("Dispersal_Age_d", expectedUnit = "d", + valueType = "numeric"), + X9.1_GestationLen_d = traitdataform::as.trait("Gestation_Length_d", expectedUnit = "d", + valueType = "numeric"), + X12.1_HabitatBreadth = traitdataform::as.trait("Habitat_Breadth", expectedUnit = NA, + valueType = "integer"), + X22.1_HomeRange_km2 = traitdataform::as.trait("Home_Range_km2", expectedUnit = "km2", + valueType = "numeric"), + X22.2_HomeRange_Indiv_km2 = traitdataform::as.trait("HomeRange_Indiv_km2", expectedUnit = "km2", + valueType = "numeric"), + X14.1_InterbirthInterval_d = traitdataform::as.trait("Interbirth_Interval_d", expectedUnit = "d", + valueType = "numeric"), + X15.1_LitterSize = traitdataform::as.trait("Litter_Size", expectedUnit = NA, + identifier = "https://ecologicaltraitdata.github.io/TraitDataList/#life-historye", + valueType = "numeric"), + X16.1_LittersPerYear = traitdataform::as.trait("Litters_Per_Year", expectedUnit = "m", + valueType = "numeric"), + X17.1_MaxLongevity_m = traitdataform::as.trait("Lifespan_max_m", expectedUnit = "m", + identifier = "https://ecologicaltraitdata.github.io/TraitDataList/#life-history", + valueType = "numeric"), + X5.3_NeonateBodyMass_g = traitdataform::as.trait("Neonate_Body_Mass_g", expectedUnit = "g", + identifier = "http://purl.obolibrary.org/obo/VT_0001259", + valueType = "numeric"), + X13.2_NeonateHeadBodyLen_mm = traitdataform::as.trait("Neonate_Body_Length_mm", expectedUnit = "mm", + valueType = "numeric"), + X21.1_PopulationDensity_n.km2 = traitdataform::as.trait("Population_Density_n.km2", expectedUnit = "n/km2", + valueType = "numeric"), + X10.1_PopulationGrpSize = traitdataform::as.trait("Population_Group_Size", expectedUnit = NA, + valueType = "numeric"), + X23.1_SexualMaturityAge_d = traitdataform::as.trait("Sexual_Maturity_Age_d", expectedUnit = "d", + identifier = "https://ecologicaltraitdata.github.io/TraitDataList/#Development", + valueType = "numeric"), + X10.2_SocialGrpSize = traitdataform::as.trait("Social_Group_Size", expectedUnit = NA, + valueType = "numeric"), + X24.1_TeatNumber = traitdataform::as.trait("Teat_Number", expectedUnit = NA, + valueType = "numeric"), + X12.2_Terrestriality = traitdataform::as.trait("Terrestriality", expectedUnit = NA, + valueType = "factor"), + X6.2_TrophicLevel = traitdataform::as.trait("Trophic_Level", expectedUnit = NA, + valueType = "factor"), + X25.1_WeaningAge_d = traitdataform::as.trait("Weaning_Age_d", expectedUnit = "d", + valueType = "numeric"), + X5.4_WeaningBodyMass_g = traitdataform::as.trait("Weaning_Body_Mass_g", expectedUnit = "g", + valueType = "numeric"), + X13.3_WeaningHeadBodyLen_mm = traitdataform::as.trait("Weaning_Body_Length_mm", expectedUnit = "mm", + valueType = "numeric"), + X5.5_AdultBodyMass_g_EXT = traitdataform::as.trait("Adult_Body_Mass_g_Estimated", expectedUnit = "g", + valueType = "numeric"), + X16.2_LittersPerYear_EXT = traitdataform::as.trait("X16.2_LittersPerYear_Estimated", expectedUnit = "g", + valueType = "numeric"), + X5.6_NeonateBodyMass_g_EXT = traitdataform::as.trait("X5.6_NeonateBodyMass_g_Estimated", expectedUnit = "g", + valueType = "numeric"), + X5.7_WeaningBodyMass_g_EXT = traitdataform::as.trait("X5.7_WeaningBodyMass_g_Estimated", expectedUnit = "g", + identifier = "http://purl.obolibrary.org/obo/VT_00012", + valueType = "numeric"), + X26.1_GR_Area_km2 = traitdataform::as.trait("Geo_Range_Area_km2", expectedUnit = "km2", + valueType = "numeric"), + X26.2_GR_MaxLat_dd = traitdataform::as.trait("Geo_Range_MaxLat_dd", expectedUnit = "degrees", + valueType = "numeric"), + X26.3_GR_MinLat_dd = traitdataform::as.trait("Geo_Range_MinLat_dd", expectedUnit = "degrees", + valueType = "numeric"), + X26.4_GR_MidRangeLat_dd = traitdataform::as.trait("Mid_Geo_RangeLat_dd", expectedUnit = "degrees", + valueType = "numeric"), + X26.5_GR_MaxLong_dd = traitdataform::as.trait("Geo_Range_MaxLong_dd", expectedUnit = "degrees", + valueType = "numeric"), + X26.6_GR_MinLong_dd = traitdataform::as.trait("Geo_Range_MinLong_dd", expectedUnit = "degrees", + valueType = "numeric"), + X26.7_GR_MidRangeLong_dd = traitdataform::as.trait("Mid_Geo_RangeLong_dd", expectedUnit = "degrees", + valueType = "numeric"), + X27.1_HuPopDen_Min_n.km2 = traitdataform::as.trait("Human_PopDensity_Min_n.km2", expectedUnit = "n/km2", + valueType = "numeric"), + X27.2_HuPopDen_Mean_n.km2 = traitdataform::as.trait("Human_PopDensity_Mean_n.km2", expectedUnit = "n/km2", + valueType = "numeric"), + X27.3_HuPopDen_5p_n.km2 = traitdataform::as.trait("Human_PopDensity_5percentile_n.km2", expectedUnit = "n/km2", + valueType = "numeric"), + X27.4_HuPopDen_Change = traitdataform::as.trait("Human_PopDensity_Change", expectedUnit = NA, + valueType = "numeric"), + X28.1_Precip_Mean_mm = traitdataform::as.trait("Precipitation_Mean_mm", expectedUnit = "mm", + valueType = "numeric"), + X28.2_Temp_Mean_01degC = traitdataform::as.trait("Temperature_Mean_01degC", expectedUnit = "degC", + valueType = "numeric"), + X30.1_AET_Mean_mm = traitdataform::as.trait("Actual_Evapotranspiration_Rate_Mean_mm", expectedUnit = "mm", + valueType = "numeric"), + X30.2_PET_Mean_mm = traitdataform::as.trait("Potential_Evapotranspiration_Rate_Mean_mm", expectedUnit = "mm", + valueType = "numeric") +) + +attr(pantheria, 'taxa') <- "MSW05_Binomial" +attr(pantheria, 'taxa') <- (basisOfRecord = "literatureData") + + +print(attributes(pantheria)$metadata) \ No newline at end of file diff --git a/data/passerine.R b/data/passerine.R new file mode 100644 index 0000000..8f6df20 --- /dev/null +++ b/data/passerine.R @@ -0,0 +1,74 @@ + +temp <- tempfile(fileext = ".zip") +utils::download.file("http://onlinelibrary.wiley.com/store/10.1002/ecy.1783/asset/supinfo/ecy1783-sup-0002-DataS1.zip?v=1&s=361647dd673d04c9b0838931cda1cf28e1f6eb1f", temp, method = "auto", quiet = TRUE, mode="wb") +utils::unzip(temp, files = "Measurements of passerine birds.xlsx", exdir = ".") + +passerine <- readxl::read_excel("Measurements of passerine birds.xlsx", sheet=1) +file.remove("Measurements of passerine birds.xlsx") +unlink(temp) +rm(temp) + +passerine$taxa <- paste(passerine$Genus,passerine$Species) + +attr(passerine, 'metadata') <- traitdataform::as.metadata( + datasetName = "Passerine morphology", + datasetID = "passerine", + bibliographicCitation = utils::bibentry( + bibtype = "Article", + title = "Passerine morphology: external measurements of approximately one-quarter of passerine bird species", + journal = "Ecology", + author = c(utils::as.person("Robert E. Ricklefs") + ), + year = 2017, + doi = "10.1002/ecy.1783" + ), + author = "Robert E. Ricklefs", + license = "http://creativecommons.org/publicdomain/zero/1.0/" +) + +attr(passerine, 'thesaurus') <- traitdataform::as.thesaurus( + Length = traitdataform::as.trait("Length", expectedUnit = "mm", valueType = "numeric", + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/#Body_length"), + Wing = traitdataform::as.trait("Wing_length", expectedUnit = "mm", valueType = "numeric", + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/#Locomotion_morphology"), + Tail = traitdataform::as.trait("Tail_length", expectedUnit = "mm", valueType = "numeric", + identifier = NA), + Tarsus = traitdataform::as.trait("Tarsus_length", expectedUnit = "mm", valueType = "numeric", + identifier = NA), + Toe = traitdataform::as.trait("Toe_length", expectedUnit = "mm", valueType = "numeric", + identifier = NA), + `Bill L` = traitdataform::as.trait("BillLength", expectedUnit = "mm", valueType = "numeric", + identifier = NA), + `Bill W` = traitdataform::as.trait("BillWidth", expectedUnit = "mm", valueType = "numeric", + identifier = NA), + `Bill D` = traitdataform::as.trait("BillDepth", expectedUnit = "mm", valueType = "numeric", + identifier = NA), + + HN = traitdataform::as.trait("Nearctic", expectedUnit = "unitless", valueType = "logic", + identifier = NA), + N = traitdataform::as.trait("Neotropics", expectedUnit = "unitless", valueType = "logic", + identifier = NA), + NI = traitdataform::as.trait("Neotropical_Islands", expectedUnit = "unitless", valueType = "logic", + identifier = NA), + HP = traitdataform::as.trait("Palearctic", expectedUnit = "unitless", valueType = "logic", + identifier = NA), + E = traitdataform::as.trait("Ethiopian", expectedUnit = "unitless", valueType = "logic", + identifier = NA), + EI = traitdataform::as.trait("African_Islands", expectedUnit = "unitless", valueType = "logic", + identifier = NA), + O = traitdataform::as.trait("Oriental", expectedUnit = "unitless", valueType = "logic", + identifier = NA), + OI = traitdataform::as.trait("Oriental_Islands", expectedUnit = "unitless", valueType = "logic", + identifier = NA), + AU = traitdataform::as.trait("Australia", expectedUnit = "unitless", valueType = "logic", + identifier = NA), + New_Zealand = traitdataform::as.trait("AZ", expectedUnit = "unitless", valueType = "logic", + identifier = NA), + AI = traitdataform::as.trait("Australia", expectedUnit = "unitless", valueType = "logic", + identifier = NA) +) + +attr(passerine, 'taxa') <- "taxa" +attr(passerine, 'keep') <- c(sex ="sex", basisOfRecord = "PreservedSpecimen") + +print(attributes(passerine)$metadata) diff --git a/data/plantsBROT.R b/data/plantsBROT.R new file mode 100644 index 0000000..384dbde --- /dev/null +++ b/data/plantsBROT.R @@ -0,0 +1,22 @@ + +temp <- tempfile(fileext = ".zip") +utils::download.file("https://ndownloader.figshare.com/articles/3531092/versions/1", temp, method = "auto", quiet = TRUE, mode="wb") +utils::unzip(temp, files = "BROT_2008.11.txt", exdir = ".") +unlink(temp) +rm(temp) + +BROT <- utils::read.table("BROT_2008.11.txt", header = T, sep="\t") +file.remove("BROT_2008.11.txt") + +attr(BROT, 'citeAs') <- utils::bibentry( + bibtype = "Article", + title = "Fire-related traits for plant species of the Mediterranean Basin", + journal = "Ecology", + volume = 90, + pages = 1420, + author = utils::as.person("Paula, S., Arianoutsou, M., Kazanis, D., Tavsanoglu, Ç., Lloret, F., Buhk, C., Ojeda, F., Luna, B., Moreno, J. M., Rodrigo, A., Espelta, J. M., Palacio, S., Fernández-Santos, B., Fernandes, P. M. and Pausas, J. G."), + year = 2009, + doi = "10.1890/08-1309.1" +) +print({cat("loading dataset 'BROT' from original data source! \n When using this data, please cite the original publication: \n") + (attributes(BROT)$citeAs) }) \ No newline at end of file diff --git a/data/plantsD3.R b/data/plantsD3.R new file mode 100644 index 0000000..7995ac9 --- /dev/null +++ b/data/plantsD3.R @@ -0,0 +1,19 @@ +plantsD3 <- utils::read.table("https://ars.els-cdn.com/content/image/1-s2.0-S1433831913000218-mmc1.txt", header = T, sep=";") + +attr(plantsD3, 'citeAs') <- utils::bibentry( + bibtype = "Article", + title = "D3: The Dispersal and Diaspore Database – Baseline data and statistics on seed dispersal", + journal = "Perspectives in Plant Ecology, Evolution and Systematics", + volume = 15, + number= 3, + pages = 180-192, + author = c(utils::person(given = "Oliver", family = "Tackenberg", email = "tackenberg@bio.uni-frankfurt.de"), utils::as.person("Christina Hintze, Felix Heydel, Christina Hoppe, Sarah Cunze, Andreas König, Oliver Tackenberg") + ), + year = 2013, + doi = "https://doi.org/10.1016/j.ppees.2013.02.001" +) +print({cat("loading dataset 'plantsD3' from original data source! \n When using this data, please cite the original publication: \n") + (attributes(plantsD3)$citeAs) }) + + +