by Schneider, F.D.
Published: 11 March 2021
github: ecologicaltraitdata/traitdataform (issues | package vignette)
Assistance for handling functional trait data and transferring them into the Ecological Trait-Data Standard (Schneider et al. 2018 Towards an Ecological Trait-data Standard, biorxiv.org DOI: 10.1101/328302).
There are two major use cases for the package:
- preparation of own trait datasets for upload into public data bases, and
- harmonizing trait datasets from different sources by moulding them into a unified format.
The toolset of the package includes
- transforming species-trait-matrix or occurence table data into a unified long-table format
- mapping column names into terms provided in a standard trait vocabulary
- matching of species names into GBIF Backbone Taxonomy (taxonomic ontology server)
- matching of trait names into a user-provided traitlist, i.e. a thesaurus of traits
- unifying trait values into target unit format and legit factor levels
- saving trait dataset into a desired format using templates (e.g. for BExIS)
Install from CRAN via
The development version of the package can be installed from Github via the ‘devtools’ package
The package requires the udunits library for unit conversion to be installed. It should install automatically, but if the package installation throws an error, it might need manual installation (see this thread for help).
pulldata("carabids") thesaurus <- as.thesaurus( body_length = as.trait("body_length", expectedUnit = "mm", identifier = "length" ), antenna_length = as.trait("antenna_length", expectedUnit = "mm", identifier = "antenna" ), metafemur_length = as.trait("metafemur_length", expectedUnit = "mm", identifier = "metafemur" ), eyewidth = as.trait("eyewidth_corr", expectedUnit = "mm", identifier = "eyewidth" ) ) traitdataset1 <- standardize(carabids, thesaurus = thesaurus, taxa = "name_correct", units = "mm" )
A documentation is available online at http://ecologicaltraitdata.github.io/traitdataform/ or offline in the package vignette ‘traitdataform’.
The traitdataform package links to a couple of datasets, which are used for demo purposes in the vignette and documentation, but can be used for research and production use.
The datasets have been published by their authors under Creative Commons 0 or Creative Commons Attribution license, which means they can be copied, modified, distributed without asking permission. Attribution must be given according to the dataset license.
For additional information and interpretation of the data please refer to the help pages of the data objects (e.g. calling
?carabids in R) and the original data sources given therein.
If you want further datasources published under Creative Commons Licenses or in the public domain being added to this package, feel free to file a pull-request with a script for download and harmonization in the
data/ directory and a documentation appended to
The package invites any contributions e.g. minor fixes and spell-checks, improving interoperability with data and other packages or software for trait-data handling. Please see the Contributing Guidelines for details.
Please note that the ‘traitdataform’ project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.
The package is under open source development. You are invited to submit pull-requests with your improvements.
We are aiming to provide the following features in future iterations of the package:
- extracting trait definitions and hierarchies from semantic ontologies (e.g. from the OWL files or via APIs), to facilitate analysis of comparable traits across taxa.
- automated matching of user-provided trait names against trait definitions in online resources, by looking up traits from published ontologies.
- harmonization of levels of factorial traits via fuzzy matching (requires lookup tables and ontologies providing legit factor levels).
- managing trait databases locally in R by managing relational data (e.g. on occurence level or measurement level, sampling event, taxon etc.) in the data.frame attributes.
Schneider, F.D. (2018) traitdataform - harmonizing ecological trait data in R, v0.5.3, DOI: 10.5281/zenodo.1489527 http://ecologicaltraitdata.github.io/traitdataform
Copyright (c) 2018 F.D. Schneider, email@example.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- Schneider, F.D., Jochum, M., Le Provost, G., Ostrowski, A., Penone, C. and Simons, N.K. (2019), Ecological Trait-data Standard Vocabulary, , doi: 10.5281/zenodo.2605377
- Rachael V. Gallagher, Daniel S. Falster, Brian S. Maitner, Roberto Salguero-Gómez, Vigdis Vandvik, William D. Pearse, Florian D. Schneider, Jens Kattge, Jorrit H. Poelen, Joshua S. Madin, Markus J. Ankenbrand, Caterina Penone, Xiao Feng, Vanessa M. Adams, John Alroy, Samuel C. Andrew, Meghan A. Balk, Lucie M. Bland, Brad L. Boyle, Catherine H. Bravo-Avila, Ian Brennan, Alexandra J. R. Carthey, Renee Catullo, Brittany R. Cavazos, Dalia A. Conde, Steven L. Chown, Belen Fadrique, Heloise Gibb, Aud H. Halbritter, Jennifer Hammock, J. Aaron Hogan, Hamish Holewa, Michael Hope, Colleen M. Iversen, Malte Jochum, Michael Kearney, Alexander Keller, Paula Mabee, Peter Manning, Luke McCormack, Sean T. Michaletz, Daniel S. Park, Timothy M. Perez, Silvia Pineda-Munoz, Courtenay A. Ray, Maurizio Rossetto, Hervé Sauquet, Benjamin Sparrow, Marko J. Spasojevic, Richard J. Telford, Joseph A. Tobias, Cyrille Violle, Ramona Walls, Katherine C. B. Weiss, Mark Westoby, Ian J. Wright & Brian J. Enquist (2020), Open Science principles for accelerating trait-based science across the Tree of Life, Nature Ecology & Evolution, 4 :294–303 doi: 10.1038/s41559-020-1109-6 (pdf)
- Schneider, F. D., M. Jochum, G. L. Provost, A. Ostrowski, C. Penone, D. Fichtmüller, A. Güntsch, M. M. Gossner, B. König-Ries, P. Manning, and N. K. Simons. (2018), Towards an Ecological Trait-data Standard, bioRxiv, :328302 doi: 10.1101/328302 (pdf)
- Schneider, F. D., M. Jochum, G. L. Provost, A. Ostrowski, C. Penone, D. Fichtmueller, A. Güntsch, M. M. Gossner, B. König-Ries, P. Manning, and N. K. Simons. (2019), Towards an Ecological Trait-data Standard, Methods in Ecology and Evolution, 10 12:2006-2019 doi: 10.1111/2041-210X.13288 (pdf)