From ac359444ae371140d25e3558206cfb181934c85d Mon Sep 17 00:00:00 2001 From: caterinap Date: Tue, 21 Nov 2017 13:55:03 +0100 Subject: [PATCH 01/22] Add data on plant dispersal --- R/data.R | 20 ++++++++++++++++++++ data/plantsD3.R | 19 +++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 data/plantsD3.R diff --git a/R/data.R b/R/data.R index 810c674..e2a04a7 100644 --- a/R/data.R +++ b/R/data.R @@ -322,3 +322,23 @@ #' @import readxl "amphibio" +# ----------------------------------------------------------------------------- + +#' D3: The Dispersal and Diaspore Database +#' +#' @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. +#' +#' @source Cite as: +#' +#' - 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) +#' +#' \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. +#' +#' @author Christina Hintze, Felix Heydel, Christina Hoppe, Sarah Cunze, Andreas König and Oliver Tackenberg +#' +#' @family rawdata +"plantsD3" + diff --git a/data/plantsD3.R b/data/plantsD3.R new file mode 100644 index 0000000..783f7fe --- /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 = "Christina", family = "Hintze", email = "tackenberg@bio.uni-frankfurt.de"), utils::as.person("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) }) + + + From 18199524714a2480b82c7c67b0cd9a92d76daeea Mon Sep 17 00:00:00 2001 From: caterinap Date: Tue, 21 Nov 2017 14:46:15 +0100 Subject: [PATCH 02/22] change plantD3 description --- R/data.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/data.R b/R/data.R index e2a04a7..a5f8028 100644 --- a/R/data.R +++ b/R/data.R @@ -326,9 +326,9 @@ #' D3: The Dispersal and Diaspore Database #' -#' @description A comprehensive database of natural history traits for amphibians worldwide. +#' @description Baseline data and statistics on plant seed dispersal #' -#' @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 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: #' From 2ec8a6fcfff54bbedd0b24e2a9f316aa70cc4a98 Mon Sep 17 00:00:00 2001 From: caterinap Date: Tue, 21 Nov 2017 15:08:59 +0100 Subject: [PATCH 03/22] Added plant BROT data --- R/data.R | 19 +++++++++++++++++++ data/plantsBROT.R | 22 ++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 data/plantsBROT.R diff --git a/R/data.R b/R/data.R index a5f8028..23af2b5 100644 --- a/R/data.R +++ b/R/data.R @@ -342,3 +342,22 @@ #' @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 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 +"plantsD3" + 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 From 5b461e8800b28b5a02707470e44a9d804b2f62d7 Mon Sep 17 00:00:00 2001 From: caterinap Date: Tue, 21 Nov 2017 16:09:02 +0100 Subject: [PATCH 04/22] Added biotraits And minor fixes to plantsD3 --- R/data.R | 25 +++++++++++++++++++++++-- data/biotraits.R | 22 ++++++++++++++++++++++ data/plantsD3.R | 2 +- 3 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 data/biotraits.R diff --git a/R/data.R b/R/data.R index 23af2b5..3d29b28 100644 --- a/R/data.R +++ b/R/data.R @@ -352,12 +352,33 @@ #' #' @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 +#' - 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 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 -"plantsD3" +"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" + 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/plantsD3.R b/data/plantsD3.R index 783f7fe..7995ac9 100644 --- a/data/plantsD3.R +++ b/data/plantsD3.R @@ -7,7 +7,7 @@ attr(plantsD3, 'citeAs') <- utils::bibentry( volume = 15, number= 3, pages = 180-192, - author = c(utils::person(given = "Christina", family = "Hintze", email = "tackenberg@bio.uni-frankfurt.de"), utils::as.person("Felix Heydel, Christina Hoppe, Sarah Cunze, Andreas König, Oliver Tackenberg") + 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" From 5aa9f227e5ac2cce3e90574a6eb2e168c3eb15a8 Mon Sep 17 00:00:00 2001 From: caterinap Date: Tue, 21 Nov 2017 13:55:03 +0100 Subject: [PATCH 05/22] Add data on plant dispersal --- R/data.R | 20 ++++++++++++++++++++ data/plantsD3.R | 19 +++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 data/plantsD3.R diff --git a/R/data.R b/R/data.R index 810c674..e2a04a7 100644 --- a/R/data.R +++ b/R/data.R @@ -322,3 +322,23 @@ #' @import readxl "amphibio" +# ----------------------------------------------------------------------------- + +#' D3: The Dispersal and Diaspore Database +#' +#' @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. +#' +#' @source Cite as: +#' +#' - 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) +#' +#' \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. +#' +#' @author Christina Hintze, Felix Heydel, Christina Hoppe, Sarah Cunze, Andreas König and Oliver Tackenberg +#' +#' @family rawdata +"plantsD3" + diff --git a/data/plantsD3.R b/data/plantsD3.R new file mode 100644 index 0000000..783f7fe --- /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 = "Christina", family = "Hintze", email = "tackenberg@bio.uni-frankfurt.de"), utils::as.person("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) }) + + + From 36209b3bed086a3e3f6821e6e6a176ba13cdea59 Mon Sep 17 00:00:00 2001 From: caterinap Date: Tue, 21 Nov 2017 14:46:15 +0100 Subject: [PATCH 06/22] change plantD3 description --- R/data.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/data.R b/R/data.R index e2a04a7..a5f8028 100644 --- a/R/data.R +++ b/R/data.R @@ -326,9 +326,9 @@ #' D3: The Dispersal and Diaspore Database #' -#' @description A comprehensive database of natural history traits for amphibians worldwide. +#' @description Baseline data and statistics on plant seed dispersal #' -#' @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 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: #' From a1aca8ffb6f355ffe855e4ddf8b240ed835d8db2 Mon Sep 17 00:00:00 2001 From: caterinap Date: Tue, 21 Nov 2017 15:08:59 +0100 Subject: [PATCH 07/22] Added plant BROT data --- R/data.R | 19 +++++++++++++++++++ data/plantsBROT.R | 22 ++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 data/plantsBROT.R diff --git a/R/data.R b/R/data.R index a5f8028..23af2b5 100644 --- a/R/data.R +++ b/R/data.R @@ -342,3 +342,22 @@ #' @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 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 +"plantsD3" + 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 From 278da75d169ee4294bcf532ec345b5f3bf2eb3a4 Mon Sep 17 00:00:00 2001 From: caterinap Date: Tue, 21 Nov 2017 16:09:02 +0100 Subject: [PATCH 08/22] Added biotraits And minor fixes to plantsD3 --- R/data.R | 25 +++++++++++++++++++++++-- data/biotraits.R | 22 ++++++++++++++++++++++ data/plantsD3.R | 2 +- 3 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 data/biotraits.R diff --git a/R/data.R b/R/data.R index 23af2b5..3d29b28 100644 --- a/R/data.R +++ b/R/data.R @@ -352,12 +352,33 @@ #' #' @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 +#' - 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 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 -"plantsD3" +"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" + 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/plantsD3.R b/data/plantsD3.R index 783f7fe..7995ac9 100644 --- a/data/plantsD3.R +++ b/data/plantsD3.R @@ -7,7 +7,7 @@ attr(plantsD3, 'citeAs') <- utils::bibentry( volume = 15, number= 3, pages = 180-192, - author = c(utils::person(given = "Christina", family = "Hintze", email = "tackenberg@bio.uni-frankfurt.de"), utils::as.person("Felix Heydel, Christina Hoppe, Sarah Cunze, Andreas König, Oliver Tackenberg") + 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" From 36a0f639f185c81c0cc00cd0f12a318a7f2372b1 Mon Sep 17 00:00:00 2001 From: caterinap Date: Wed, 22 Nov 2017 19:10:11 +0100 Subject: [PATCH 09/22] Updated mammaldiet --- data/mammaldiet.R | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/data/mammaldiet.R b/data/mammaldiet.R index 60a7bb3..ae381d4 100644 --- a/data/mammaldiet.R +++ b/data/mammaldiet.R @@ -3,19 +3,27 @@ mammaldiet <- utils::read.csv("http://datadryad.org/bitstream/handle/10255/dryad.64565/MammalDIET_v1.0.txt?sequence=1", sep = "\t", fileEncoding = "UTF-8" - ) +) -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") +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" ), - year = 2014, - doi = "10.1002/ece3.1136" + author = "Wilm Daniel Kissling", + license = "http://creativecommons.org/publicdomain/zero/1.0/" ) -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, 'thesaurus') <- traitdataform::as.thesaurus( + diet_content = traitdataform::as.trait("diet_content", valueType = "factor"), + TrophicLevel = traitdataform::as.trait("TrophicLevel", valueType = "factor"), + dietary_guild = traitdataform::as.trait("dietary_guild", valueType = "factor")) + +print(attributes(mammaldiet)$metadata) From 836ad23454e49f0ab3fae7e613ba58b22f13dd07 Mon Sep 17 00:00:00 2001 From: caterinap Date: Wed, 22 Nov 2017 19:23:12 +0100 Subject: [PATCH 10/22] Updated mammaldiet --- data/mammaldiet.R | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/data/mammaldiet.R b/data/mammaldiet.R index ae381d4..94b5125 100644 --- a/data/mammaldiet.R +++ b/data/mammaldiet.R @@ -16,14 +16,36 @@ attr(mammaldiet, 'metadata') <- traitdataform::as.metadata( 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, 'thesaurus') <- traitdataform::as.thesaurus( - diet_content = traitdataform::as.trait("diet_content", valueType = "factor"), + 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"), - dietary_guild = traitdataform::as.trait("dietary_guild", 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(attributes(mammaldiet)$metadata) From 28e50363fffa33f23508cec9ec4461e72949d30b Mon Sep 17 00:00:00 2001 From: caterinap Date: Fri, 24 Nov 2017 10:25:54 +0100 Subject: [PATCH 11/22] Fix mammaldiet taxon name --- data/mammaldiet.R | 3 +++ 1 file changed, 3 insertions(+) diff --git a/data/mammaldiet.R b/data/mammaldiet.R index 94b5125..68997a4 100644 --- a/data/mammaldiet.R +++ b/data/mammaldiet.R @@ -5,6 +5,9 @@ mammaldiet <- utils::read.csv("http://datadryad.org/bitstream/handle/10255/dryad fileEncoding = "UTF-8" ) +mammaldiet$taxa <- paste(mammaldiet$Genus, mammaldiet$Species) +attr(mammaldiet, 'taxa') <- "taxa" + attr(mammaldiet, 'metadata') <- traitdataform::as.metadata( datasetName = "Mammal diet database", datasetID = "mammaldiet", From ec92eb2061db7777cd84091c798c028ed47436bc Mon Sep 17 00:00:00 2001 From: caterinap Date: Fri, 24 Nov 2017 11:58:47 +0100 Subject: [PATCH 12/22] New version amniota dataset --- R/data.R | 52 +++++++++++++++-- data/amniota.R | 153 ++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 188 insertions(+), 17 deletions(-) diff --git a/R/data.R b/R/data.R index 3d29b28..8f1779d 100644 --- a/R/data.R +++ b/R/data.R @@ -123,15 +123,54 @@ #' @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 #' classifications has revealed many interesting and important patterns, but @@ -160,6 +199,11 @@ #' 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" diff --git a/data/amniota.R b/data/amniota.R index da4959c..f5dda32 100644 --- a/data/amniota.R +++ b/data/amniota.R @@ -2,17 +2,144 @@ 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) +attr(amniota, 'taxa') <- "taxa" + +attr(amniota, 'metadata') <- traitdataform::as.metadata( + datasetName = "Amnote life-history", + 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/" +) + +attr(amniota, 'thesaurus') <- traitdataform::as.thesaurus( + female_maturity_d = traitdataform::as.trait("female_maturity_d", + expectedUnit = "d", valueType = "numeric", + identifier = NA), + + litter_or_clutch_size_n = traitdataform::as.trait("litter_or_clutch_size_n", + valueType = "numeric", + identifier = NA), + + 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://purl.obolibrary.org/obo/VT_0001661"), + + 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://purl.obolibrary.org/obo/VT_0001697"), + + incubation_d = traitdataform::as.trait("incubation_d", + expectedUnit = "d", valueType = "numeric", + identifier = NA), + + 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 = NA), + + 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://purl.obolibrary.org/obo/VT_0001697"), + + egg_length_mm = traitdataform::as.trait("egg_length_mm", + expectedUnit = "mm", valueType = "numeric", + identifier = "http://purl.obolibrary.org/obo/VT_0001697"), + + 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 = NA), ) -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 + +print(attributes(amniota)$metadata) + + + From e5fe808af1ea736de49fe422efd3318abe4f4090 Mon Sep 17 00:00:00 2001 From: caterinap Date: Fri, 24 Nov 2017 14:08:03 +0100 Subject: [PATCH 13/22] Complete mammaldiet documentation --- R/data.R | 86 +++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 70 insertions(+), 16 deletions(-) diff --git a/R/data.R b/R/data.R index 8f1779d..d481cdc 100644 --- a/R/data.R +++ b/R/data.R @@ -172,7 +172,8 @@ #' \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 @@ -266,7 +267,7 @@ # ---------------------------------------------------------------------------- -#' 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 @@ -274,27 +275,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} #' -#' \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 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’ +#' } #' -#' @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. @@ -336,10 +387,13 @@ #' 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" # ----------------------------------------------------------------------------- From 728db3dca8b7fd2489acd6e8f60dd2ceee6d7f72 Mon Sep 17 00:00:00 2001 From: caterinap Date: Fri, 24 Nov 2017 15:16:01 +0100 Subject: [PATCH 14/22] Amniota refined uri --- data/amniota.R | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/data/amniota.R b/data/amniota.R index f5dda32..7c97224 100644 --- a/data/amniota.R +++ b/data/amniota.R @@ -5,6 +5,9 @@ amniota <- utils::read.csv("http://esapubs.org/archive/ecol/E096/269/Data_Files/ amniota$taxa <- paste(amniota$genus, amniota$species) attr(amniota, 'taxa') <- "taxa" +#replace -999 with NA +amniota[amniota == -999] <- NA + attr(amniota, 'metadata') <- traitdataform::as.metadata( datasetName = "Amnote life-history", datasetID = "amniota", @@ -24,11 +27,11 @@ attr(amniota, 'metadata') <- traitdataform::as.metadata( attr(amniota, 'thesaurus') <- traitdataform::as.thesaurus( female_maturity_d = traitdataform::as.trait("female_maturity_d", expectedUnit = "d", valueType = "numeric", - identifier = NA), + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/Development"), litter_or_clutch_size_n = traitdataform::as.trait("litter_or_clutch_size_n", valueType = "numeric", - identifier = NA), + identifier = " http://ecologicaltraitdata.github.io/TraitDataList/Reproduction_mode"), litters_or_clutches_per_y = traitdataform::as.trait("litters_or_clutches_per_y", valueType = "numeric", @@ -40,7 +43,7 @@ attr(amniota, 'thesaurus') <- traitdataform::as.thesaurus( maximum_longevity_y = traitdataform::as.trait("maximum_longevity_y", expectedUnit = "a", valueType = "numeric", - identifier = "http://purl.obolibrary.org/obo/VT_0001661"), + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/Life_span_potential"), gestation_d = traitdataform::as.trait("gestation_d", expectedUnit = "d", valueType = "numeric", @@ -60,11 +63,11 @@ attr(amniota, 'thesaurus') <- traitdataform::as.thesaurus( egg_mass_g = traitdataform::as.trait("egg_mass_g", expectedUnit = "g", valueType = "numeric", - identifier = "http://purl.obolibrary.org/obo/VT_0001697"), + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/Egg_biomass"), incubation_d = traitdataform::as.trait("incubation_d", expectedUnit = "d", valueType = "numeric", - identifier = NA), + identifier = "https://ecologicaltraitdata.github.io/TraitDataList/#egg_development_time"), fledging_age_d = traitdataform::as.trait("fledging_age_d", expectedUnit = "d", valueType = "numeric", @@ -76,7 +79,7 @@ attr(amniota, 'thesaurus') <- traitdataform::as.thesaurus( male_maturity_d = traitdataform::as.trait("male_maturity_d", expectedUnit = "d", valueType = "numeric", - identifier = NA), + 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", @@ -96,11 +99,11 @@ attr(amniota, 'thesaurus') <- traitdataform::as.thesaurus( egg_width_mm = traitdataform::as.trait("egg_width_mm", expectedUnit = "mm", valueType = "numeric", - identifier = "http://purl.obolibrary.org/obo/VT_0001697"), + identifier = " http://ecologicaltraitdata.github.io/TraitDataList/Egg_size"), egg_length_mm = traitdataform::as.trait("egg_length_mm", expectedUnit = "mm", valueType = "numeric", - identifier = "http://purl.obolibrary.org/obo/VT_0001697"), + identifier = " http://ecologicaltraitdata.github.io/TraitDataList/Egg_size"), fledging_mass_g = traitdataform::as.trait("fledging_mass_g", expectedUnit = "g", valueType = "numeric", From ad827349c1c4b3292f08583f62c22e58c668aff8 Mon Sep 17 00:00:00 2001 From: caterinap Date: Fri, 24 Nov 2017 16:34:38 +0100 Subject: [PATCH 15/22] Modified pantheria + minor on amniota and mammaldiet --- R/data.R | 41 +++++++------- data/amniota.R | 12 +++-- data/mammaldiet.R | 4 +- data/pantheria.R | 134 ++++++++++++++++++++++++++++++++++++++++++++-- 4 files changed, 160 insertions(+), 31 deletions(-) diff --git a/R/data.R b/R/data.R index 9550a1a..b646362 100644 --- a/R/data.R +++ b/R/data.R @@ -212,19 +212,29 @@ #' PanTHERIA 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): #' @@ -246,23 +256,12 @@ #' 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" # ---------------------------------------------------------------------------- diff --git a/data/amniota.R b/data/amniota.R index 7c97224..4911a74 100644 --- a/data/amniota.R +++ b/data/amniota.R @@ -3,7 +3,6 @@ amniota <- utils::read.csv("http://esapubs.org/archive/ecol/E096/269/Data_Files/ fileEncoding = "UTF-8") amniota$taxa <- paste(amniota$genus, amniota$species) -attr(amniota, 'taxa') <- "taxa" #replace -999 with NA amniota[amniota == -999] <- NA @@ -31,7 +30,7 @@ attr(amniota, 'thesaurus') <- traitdataform::as.thesaurus( litter_or_clutch_size_n = traitdataform::as.trait("litter_or_clutch_size_n", valueType = "numeric", - identifier = " http://ecologicaltraitdata.github.io/TraitDataList/Reproduction_mode"), + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/Reproduction_mode"), litters_or_clutches_per_y = traitdataform::as.trait("litters_or_clutches_per_y", valueType = "numeric", @@ -99,11 +98,11 @@ attr(amniota, 'thesaurus') <- traitdataform::as.thesaurus( egg_width_mm = traitdataform::as.trait("egg_width_mm", expectedUnit = "mm", valueType = "numeric", - identifier = " http://ecologicaltraitdata.github.io/TraitDataList/Egg_size"), + 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"), + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/Egg_size"), fledging_mass_g = traitdataform::as.trait("fledging_mass_g", expectedUnit = "g", valueType = "numeric", @@ -139,9 +138,12 @@ attr(amniota, 'thesaurus') <- traitdataform::as.thesaurus( no_sex_maturity_d = traitdataform::as.trait("no_sex_maturity_d", expectedUnit = "d", valueType = "numeric", - identifier = NA), + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/Development"), ) +attr(amniota, 'taxa') <- "taxa" + + print(attributes(amniota)$metadata) diff --git a/data/mammaldiet.R b/data/mammaldiet.R index 68997a4..c7f33b1 100644 --- a/data/mammaldiet.R +++ b/data/mammaldiet.R @@ -6,7 +6,6 @@ mammaldiet <- utils::read.csv("http://datadryad.org/bitstream/handle/10255/dryad ) mammaldiet$taxa <- paste(mammaldiet$Genus, mammaldiet$Species) -attr(mammaldiet, 'taxa') <- "taxa" attr(mammaldiet, 'metadata') <- traitdataform::as.metadata( datasetName = "Mammal diet database", @@ -51,4 +50,7 @@ attr(mammaldiet, 'thesaurus') <- traitdataform::as.thesaurus( diet_guild_Folivore = traitdataform::as.trait("diet_guild_Folivore", valueType = "logical") ) +attr(mammaldiet, 'taxa') <- "taxa" +attr(mammaldiet, 'keep') <- c(datasetID = "DataSource", taxaSynonym = "note") + print(attributes(mammaldiet)$metadata) diff --git a/data/pantheria.R b/data/pantheria.R index a6261e4..f41ff9c 100644 --- a/data/pantheria.R +++ b/data/pantheria.R @@ -3,16 +3,142 @@ 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(amniota, 'thesaurus') <- traitdataform::as.thesaurus( + X1.1_ActivityCycle = traitdataform::as.trait("X1.1_ActivityCycle", expectedUnit = NA, + identifier = "http://purl.obolibrary.org/obo/VT_0001502", + valueType = "factor"), + X5.1_AdultBodyMass_g = traitdataform::as.trait("X5.1_AdultBodyMass_g", expectedUnit = "g", + identifier = "http://purl.obolibrary.org/obo/VT_0001259", + valueType = "numeric"), + X8.1_AdultForearmLen_mm = traitdataform::as.trait("X8.1_AdultForearmLen_mm", expectedUnit = "mm", + valueType = "numeric"), + X13.1_AdultHeadBodyLen_mm = traitdataform::as.trait("X13.1_AdultHeadBodyLen_mm", expectedUnit = "mm", + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/Body_length", + valueType = "numeric"), + X2.1_AgeatEyeOpening_d = traitdataform::as.trait("X2.1_AgeatEyeOpening_d", expectedUnit = "d", + valueType = "numeric"), + X3.1_AgeatFirstBirth_d = traitdataform::as.trait("X3.1_AgeatFirstBirth_d", expectedUnit = "d", + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/Age_at_reproduction", + valueType = "numeric"), + X18.1_BasalMetRate_mLO2hr = traitdataform::as.trait("X18.1_BasalMetRate_mLO2hr", expectedUnit = "mL.O2/hr", + valueType = "numeric"), + X5.2_BasalMetRateMass_g = traitdataform::as.trait("X5.2_BasalMetRateMass_g", expectedUnit = "g", + valueType = "numeric"), + X6.1_DietBreadth = traitdataform::as.trait("X6.1_DietBreadth", expectedUnit = NA, + valueType = "integer"), + X7.1_DispersalAge_d = traitdataform::as.trait("X7.1_DispersalAge_d", expectedUnit = "d", + valueType = "numeric"), + X9.1_GestationLen_d = traitdataform::as.trait("X9.1_GestationLen_d", expectedUnit = "d", + valueType = "numeric"), + X12.1_HabitatBreadth = traitdataform::as.trait("X12.1_HabitatBreadth", expectedUnit = NA, + valueType = "integer"), + X22.1_HomeRange_km2 = traitdataform::as.trait("X22.1_HomeRange_km2", expectedUnit = "km2", + valueType = "numeric"), + X22.2_HomeRange_Indiv_km2 = traitdataform::as.trait("X22.2_HomeRange_Indiv_km2", expectedUnit = "km2", + valueType = "numeric"), + X14.1_InterbirthInterval_d = traitdataform::as.trait("X14.1_InterbirthInterval_d", expectedUnit = "d", + valueType = "numeric"), + X15.1_LitterSize = traitdataform::as.trait("X15.1_LitterSize", expectedUnit = NA, + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/Reproduction_mode", + valueType = "numeric"), + X16.1_LittersPerYear = traitdataform::as.trait("X16.1_LittersPerYear", expectedUnit = "m", + valueType = "numeric"), + X17.1_MaxLongevity_m = traitdataform::as.trait("X17.1_MaxLongevity_m", expectedUnit = "m", + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/Life_span_potential", + valueType = "numeric"), + X5.3_NeonateBodyMass_g = traitdataform::as.trait("X5.3_NeonateBodyMass_g", expectedUnit = "g", + identifier = "http://purl.obolibrary.org/obo/VT_0001259", + valueType = "numeric"), + X13.2_NeonateHeadBodyLen_mm = traitdataform::as.trait("X13.2_NeonateHeadBodyLen_mm", expectedUnit = "mm", + valueType = "numeric"), + X21.1_PopulationDensity_n.km2 = traitdataform::as.trait("X21.1_PopulationDensity_n.km2", expectedUnit = "n/km2", + valueType = "numeric"), + X10.1_PopulationGrpSize = traitdataform::as.trait("X10.1_PopulationGrpSize", expectedUnit = NA, + valueType = "numeric"), + X23.1_SexualMaturityAge_d = traitdataform::as.trait("X23.1_SexualMaturityAge_d", expectedUnit = "d", + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/Development", + valueType = "numeric"), + X10.2_SocialGrpSize = traitdataform::as.trait("X10.2_SocialGrpSize", expectedUnit = NA, + valueType = "numeric"), + X24.1_TeatNumber = traitdataform::as.trait("X24.1_TeatNumber", expectedUnit = NA, + valueType = "numeric"), + X12.2_Terrestriality = traitdataform::as.trait("X12.2_Terrestriality", expectedUnit = NA, + valueType = "factor"), + X6.2_TrophicLevel = traitdataform::as.trait("X6.2_TrophicLevel", expectedUnit = NA, + identifier = " http://ecologicaltraitdata.github.io/TraitDataList/feeding", + valueType = "factor"), + X25.1_WeaningAge_d = traitdataform::as.trait("X25.1_WeaningAge_d", expectedUnit = "d", + valueType = "numeric"), + X5.4_WeaningBodyMass_g = traitdataform::as.trait("X5.4_WeaningBodyMass_g", expectedUnit = "g", + valueType = "numeric"), + X13.3_WeaningHeadBodyLen_mm = traitdataform::as.trait("X13.3_WeaningHeadBodyLen_mm", expectedUnit = "mm", + valueType = "numeric"), + X5.5_AdultBodyMass_g_EXT = traitdataform::as.trait("X5.5_AdultBodyMass_g_EXT", expectedUnit = "g", + valueType = "numeric"), + X16.2_LittersPerYear_EXT = traitdataform::as.trait("X16.2_LittersPerYear_EXT", expectedUnit = "g", + valueType = "numeric"), + X5.6_NeonateBodyMass_g_EXT = traitdataform::as.trait("X5.6_NeonateBodyMass_g_EXT", expectedUnit = "g", + valueType = "numeric"), + X5.7_WeaningBodyMass_g_EXT = traitdataform::as.trait("X5.7_WeaningBodyMass_g_EXT", expectedUnit = "g", + identifier = "http://purl.obolibrary.org/obo/VT_00012", + valueType = "numeric"), + X26.1_GR_Area_km2 = traitdataform::as.trait("X26.1_GR_Area_km2", expectedUnit = "km2", + valueType = "numeric"), + X26.2_GR_MaxLat_dd = traitdataform::as.trait("X26.2_GR_MaxLat_dd", expectedUnit = "degrees", + valueType = "numeric"), + X26.3_GR_MinLat_dd = traitdataform::as.trait("X26.3_GR_MinLat_dd", expectedUnit = "degrees", + valueType = "numeric"), + X26.4_GR_MidRangeLat_dd = traitdataform::as.trait("X26.4_GR_MidRangeLat_dd", expectedUnit = "degrees", + valueType = "numeric"), + X26.5_GR_MaxLong_dd = traitdataform::as.trait("X26.5_GR_MaxLong_dd", expectedUnit = "degrees", + valueType = "numeric"), + X26.6_GR_MinLong_dd = traitdataform::as.trait("X26.6_GR_MinLong_dd", expectedUnit = "degrees", + valueType = "numeric"), + X26.7_GR_MidRangeLong_dd = traitdataform::as.trait("X26.7_GR_MidRangeLong_dd", expectedUnit = "degrees", + valueType = "numeric"), + X27.1_HuPopDen_Min_n.km2 = traitdataform::as.trait("X27.1_HuPopDen_Min_n.km2", expectedUnit = "n/km2", + valueType = "numeric"), + X27.2_HuPopDen_Mean_n.km2 = traitdataform::as.trait("X27.2_HuPopDen_Mean_n.km2", expectedUnit = "n/km2", + valueType = "numeric"), + X27.3_HuPopDen_5p_n.km2 = traitdataform::as.trait("X27.3_HuPopDen_5p_n.km2", expectedUnit = "n/km2", + valueType = "numeric"), + X27.4_HuPopDen_Change = traitdataform::as.trait("X27.4_HuPopDen_Change", expectedUnit = NA, + valueType = "numeric"), + X28.1_Precip_Mean_mm = traitdataform::as.trait("X28.1_Precip_Mean_mm", expectedUnit = "mm", + valueType = "numeric"), + X28.2_Temp_Mean_01degC = traitdataform::as.trait("X28.2_Temp_Mean_01degC", expectedUnit = "degreeC", + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/Ecological_niche", + valueType = "numeric"), + X30.1_AET_Mean_mm = traitdataform::as.trait("X30.1_AET_Mean_mm", expectedUnit = "mm", + valueType = "numeric"), + X30.2_PET_Mean_mm = traitdataform::as.trait("X30.2_PET_Mean_mm", expectedUnit = "mm", + valueType = "numeric") +) + +attr(pantheria, 'taxa') <- "MSW05_Binomial" + + +print(attributes(pantheria)$metadata) \ No newline at end of file From 96fc382c431896c7530b107c2c25df602fe439f6 Mon Sep 17 00:00:00 2001 From: caterinap Date: Tue, 28 Nov 2017 11:13:17 +0100 Subject: [PATCH 16/22] Added amphibio --- R/data.R | 83 ++++++++++++++++++++++++----- data/amniota.R | 2 +- data/amphibio.R | 135 ++++++++++++++++++++++++++++++++++++++++++++---- 3 files changed, 195 insertions(+), 25 deletions(-) diff --git a/R/data.R b/R/data.R index b646362..ac9d80a 100644 --- a/R/data.R +++ b/R/data.R @@ -397,27 +397,84 @@ # ----------------------------------------------------------------------------- -#' 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. -#' -#' @source Cite as: +#' @details When using this data, please cite the original publication: #' -#' - 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) +#' \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)} #' -#' Please also cite the data repository on figshare: +#' Additionally, please cite the data repository on figshare: #' -#' - 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} -#' -#' \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 +#' \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 #' -#' @family rawdata -#' @import readxl "amphibio" +#' +#' +#' +#' + # ----------------------------------------------------------------------------- diff --git a/data/amniota.R b/data/amniota.R index 4911a74..cb54c51 100644 --- a/data/amniota.R +++ b/data/amniota.R @@ -30,7 +30,7 @@ attr(amniota, 'thesaurus') <- traitdataform::as.thesaurus( litter_or_clutch_size_n = traitdataform::as.trait("litter_or_clutch_size_n", valueType = "numeric", - identifier = "http://ecologicaltraitdata.github.io/TraitDataList/Reproduction_mode"), + 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", diff --git a/data/amphibio.R b/data/amphibio.R index 3863471..cea5ce3 100644 --- a/data/amphibio.R +++ b/data/amphibio.R @@ -8,15 +8,128 @@ rm(temp) amphibio <- utils::read.csv("AmphiBIO_v1.csv") 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("Fos", + expectedUnit = NA, valueType = "logical", + identifier = NA), + Ter = traitdataform::as.trait("Ter", + expectedUnit = NA, valueType = "logical", + identifier = NA), + Aqu = traitdataform::as.trait("Aqu", + expectedUnit = NA, valueType = "logical", + identifier = NA), + Arb = traitdataform::as.trait("Arb", + 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("Diu", + expectedUnit = NA, valueType = "logical", + identifier = "http://purl.obolibrary.org/obo/VT_0001502"), + Noc = traitdataform::as.trait("Noc", + expectedUnit = NA, valueType = "logical", + identifier = "http://purl.obolibrary.org/obo/VT_0001502"), + Crepu = traitdataform::as.trait("Crepu", + expectedUnit = NA, valueType = "logical", + identifier = "http://purl.obolibrary.org/obo/VT_0001502"), + + Wet_warm = traitdataform::as.trait("Wet_warm", + expectedUnit = NA, valueType = "logical", + identifier = NA), + Wet_cold = traitdataform::as.trait("Wet_cold", + expectedUnit = NA, valueType = "logical", + identifier = NA), + Dry_warm = traitdataform::as.trait("Dry_warm", + expectedUnit = NA, valueType = "logical", + identifier = NA), + Dry_cold = traitdataform::as.trait("Dry_cold", + 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 = " http://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 = "http://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("Dir", + expectedUnit = NA, valueType = "logical", + identifier = NA), + Lar = traitdataform::as.trait("Lar", + expectedUnit = NA, valueType = "logical", + identifier = NA), + Viv = traitdataform::as.trait("Viv", + expectedUnit = NA, valueType = "logical", + identifier = NA) +) + +attr(amphibio, 'Species') <- "Species" +attr(maphivio, "Comment") <- "OBS" + + +print(attributes(amphibio)$metadata) + From 458109a4b69b27b1208a2748a334f445c21b2a2d Mon Sep 17 00:00:00 2001 From: caterinap Date: Tue, 28 Nov 2017 14:04:12 +0100 Subject: [PATCH 17/22] Added passerine data + minor --- R/data.R | 61 ++++++++++++++++++++++++++++++++++++++--- data/amphibio.R | 2 +- data/mammaldiet.R | 2 +- data/passerine.R | 70 +++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 129 insertions(+), 6 deletions(-) create mode 100644 data/passerine.R diff --git a/R/data.R b/R/data.R index ac9d80a..238ac90 100644 --- a/R/data.R +++ b/R/data.R @@ -470,10 +470,6 @@ #' @family rawdata #' "amphibio" -#' -#' -#' -#' # ----------------------------------------------------------------------------- @@ -535,4 +531,61 @@ #' @family rawdata "biotraits" +# ----------------------------------------------------------------------------- +#' @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" + + + diff --git a/data/amphibio.R b/data/amphibio.R index cea5ce3..885b467 100644 --- a/data/amphibio.R +++ b/data/amphibio.R @@ -128,7 +128,7 @@ attr(amphibio, 'thesaurus') <- traitdataform::as.thesaurus( ) attr(amphibio, 'Species') <- "Species" -attr(maphivio, "Comment") <- "OBS" +attr(amphibio, 'keep') <- c(measurementRemarks = "OBS") print(attributes(amphibio)$metadata) diff --git a/data/mammaldiet.R b/data/mammaldiet.R index c7f33b1..607c928 100644 --- a/data/mammaldiet.R +++ b/data/mammaldiet.R @@ -51,6 +51,6 @@ attr(mammaldiet, 'thesaurus') <- traitdataform::as.thesaurus( ) attr(mammaldiet, 'taxa') <- "taxa" -attr(mammaldiet, 'keep') <- c(datasetID = "DataSource", taxaSynonym = "note") +attr(mammaldiet, 'keep') <- c(datasetID = "DataSource", measurementRemarks = "note") print(attributes(mammaldiet)$metadata) diff --git a/data/passerine.R b/data/passerine.R new file mode 100644 index 0000000..9efaec5 --- /dev/null +++ b/data/passerine.R @@ -0,0 +1,70 @@ + +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 = ".") +unlink(temp) +rm(temp) + +passerine <- readxl::read_excel("Measurements of passerine birds.xlsx") +file.remove("Measurements of passerine birds.xlsx") + +passerine$taxa <- paste(passerine$Genus,passerine$Species) + +attr(passerine, 'metadata') <- traitdataform::as.metadata( + datasetName = "passerine birds", + 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", expectedUnit = "mm", valueType = "numeric", + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/Locomotion_morphology"), + Tail = traitdataform::as.trait("Tail", expectedUnit = "mm", valueType = "numeric", + identifier = NA), + Tarsus = traitdataform::as.trait("Tarsus", expectedUnit = "mm", valueType = "numeric", + identifier = NA), + Toe = traitdataform::as.trait("Toe", expectedUnit = "mm", valueType = "numeric", + identifier = NA), + BillL = traitdataform::as.trait("Bill L", expectedUnit = "mm", valueType = "numeric", + identifier = NA), + BillW = traitdataform::as.trait("Bill W", expectedUnit = "mm", valueType = "numeric", + identifier = NA), + BillD = traitdataform::as.trait("Bill D", expectedUnit = "mm", valueType = "numeric", + identifier = NA), + + HN = traitdataform::as.trait("HN", expectedUnit = "mm", valueType = "logic", + identifier = NA), + N = traitdataform::as.trait("N", expectedUnit = "mm", valueType = "logic", + identifier = NA), + NI = traitdataform::as.trait("NI", expectedUnit = "mm", valueType = "logic", + identifier = NA), + HP = traitdataform::as.trait("HP", expectedUnit = "mm", valueType = "logic", + identifier = NA), + E = traitdataform::as.trait("EI", expectedUnit = "mm", valueType = "logic", + identifier = NA), + O = traitdataform::as.trait("O", expectedUnit = "mm", valueType = "logic", + identifier = NA), + OI = traitdataform::as.trait("OI", expectedUnit = "mm", valueType = "logic", + identifier = NA), + AU = traitdataform::as.trait("AU", expectedUnit = "mm", valueType = "logic", + identifier = NA), + AZ = traitdataform::as.trait("AZ", expectedUnit = "mm", valueType = "logic", + identifier = NA), + AI = traitdataform::as.trait("AI", expectedUnit = "mm", valueType = "logic", + identifier = NA) +) + +attr(passerine, 'taxa') <- "taxa" +attr(carabids, 'keep') <- c(sex ="sex", basisOfRecord = "PreservedSpecimen") From 2e01d9cd7a498a26d9e2870785628182c761bb83 Mon Sep 17 00:00:00 2001 From: caterinap Date: Tue, 28 Nov 2017 16:10:05 +0100 Subject: [PATCH 18/22] Modified heteroptera + small fixes --- R/data.R | 146 +++++++++++++++++++---------------------- data/amniota.R | 4 +- data/amphibio.R | 6 +- data/heteroptera.R | 57 ++++++++++++---- data/heteroptera_raw.R | 83 +++++++++++++++++++---- data/pantheria.R | 2 +- data/passerine.R | 12 ++-- 7 files changed, 197 insertions(+), 113 deletions(-) diff --git a/R/data.R b/R/data.R index 238ac90..c8f898b 100644 --- a/R/data.R +++ b/R/data.R @@ -85,32 +85,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" # ------------------------------------------------------------------- @@ -210,7 +207,7 @@ # ---------------------------------------------------------------------------- -#' PanTHERIA mammal traits +#' PanTHERIA 1.0 mammal traits #' #' @description A global species-level data set of key #' life-history, ecological and geographical traits of all known extant and @@ -471,66 +468,6 @@ #' "amphibio" - -# ----------------------------------------------------------------------------- - -#' 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: -#' -#' - 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) -#' -#' \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. -#' -#' @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 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 -"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" - # ----------------------------------------------------------------------------- #' @title Passerine morphology #' @@ -586,6 +523,61 @@ #' "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: +#' +#' - 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) +#' +#' \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. +#' +#' @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 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 +"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 cb54c51..95bde2b 100644 --- a/data/amniota.R +++ b/data/amniota.R @@ -8,7 +8,7 @@ amniota$taxa <- paste(amniota$genus, amniota$species) amniota[amniota == -999] <- NA attr(amniota, 'metadata') <- traitdataform::as.metadata( - datasetName = "Amnote life-history", + datasetName = "Amniote life-history traits", datasetID = "amniota", bibliographicCitation = utils::bibentry( bibtype = "Article", @@ -138,7 +138,7 @@ attr(amniota, 'thesaurus') <- traitdataform::as.thesaurus( no_sex_maturity_d = traitdataform::as.trait("no_sex_maturity_d", expectedUnit = "d", valueType = "numeric", - identifier = "http://ecologicaltraitdata.github.io/TraitDataList/Development"), + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/Development") ) attr(amniota, 'taxa') <- "taxa" diff --git a/data/amphibio.R b/data/amphibio.R index 885b467..1965616 100644 --- a/data/amphibio.R +++ b/data/amphibio.R @@ -5,11 +5,11 @@ 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, 'metadata') <- traitdataform::as.metadata( - datasetName = "AmphiBio", + datasetName = "AmphiBIO", datasetID = "amphibio", bibliographicCitation = utils::bibentry( bibtype = "Article", @@ -127,7 +127,7 @@ attr(amphibio, 'thesaurus') <- traitdataform::as.thesaurus( identifier = NA) ) -attr(amphibio, 'Species') <- "Species" +attr(amphibio, 'taxa') <- "Species" attr(amphibio, 'keep') <- c(measurementRemarks = "OBS") 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..32774af 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, 'taxa') <- "SpeciesID" +attr(heteroptera, 'keep') <- c(basisOfRecord = "PreservedSpecimen", references="Author", sex="Sex", + references = "Source", measurementRemarks = "Voucher_ID", + measurementID = "ID") diff --git a/data/pantheria.R b/data/pantheria.R index f41ff9c..b4d16f5 100644 --- a/data/pantheria.R +++ b/data/pantheria.R @@ -26,7 +26,7 @@ author = "Kate E. Jones", license = "http://creativecommons.org/publicdomain/zero/1.0/" ) -attr(amniota, 'thesaurus') <- traitdataform::as.thesaurus( +attr(pantheria, 'thesaurus') <- traitdataform::as.thesaurus( X1.1_ActivityCycle = traitdataform::as.trait("X1.1_ActivityCycle", expectedUnit = NA, identifier = "http://purl.obolibrary.org/obo/VT_0001502", valueType = "factor"), diff --git a/data/passerine.R b/data/passerine.R index 9efaec5..c03c548 100644 --- a/data/passerine.R +++ b/data/passerine.R @@ -2,16 +2,16 @@ 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 = ".") -unlink(temp) -rm(temp) -passerine <- readxl::read_excel("Measurements of passerine birds.xlsx") +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 birds", + datasetName = "Passerine morphology", datasetID = "passerine", bibliographicCitation = utils::bibentry( bibtype = "Article", @@ -67,4 +67,6 @@ attr(passerine, 'thesaurus') <- traitdataform::as.thesaurus( ) attr(passerine, 'taxa') <- "taxa" -attr(carabids, 'keep') <- c(sex ="sex", basisOfRecord = "PreservedSpecimen") +attr(passerine, 'keep') <- c(sex ="sex", basisOfRecord = "PreservedSpecimen") + +print(attributes(passerine)$metadata) From 370f3fa28de60985beb5744ff15b3355a8847279 Mon Sep 17 00:00:00 2001 From: caterinap Date: Tue, 28 Nov 2017 16:19:55 +0100 Subject: [PATCH 19/22] Minor --- data/heteroptera_raw.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/heteroptera_raw.R b/data/heteroptera_raw.R index 32774af..fb6d477 100644 --- a/data/heteroptera_raw.R +++ b/data/heteroptera_raw.R @@ -81,7 +81,7 @@ attr(heteroptera_raw, 'thesaurus') <- traitdataform::as.thesaurus( ) -attr(heteroptera, 'taxa') <- "SpeciesID" -attr(heteroptera, 'keep') <- c(basisOfRecord = "PreservedSpecimen", references="Author", sex="Sex", +attr(heteroptera_raw, 'taxa') <- "SpeciesID" +attr(heteroptera_raw, 'keep') <- c(basisOfRecord = "PreservedSpecimen", references="Author", sex="Sex", references = "Source", measurementRemarks = "Voucher_ID", measurementID = "ID") From b0daba410ca5cb40b793f4bd7a22402d6b1bc27d Mon Sep 17 00:00:00 2001 From: caterinap Date: Wed, 29 Nov 2017 14:08:55 +0100 Subject: [PATCH 20/22] Change cryptic trait names --- R/data.R | 3 +- data/amphibio.R | 28 +++++++------- data/pantheria.R | 98 ++++++++++++++++++++++++------------------------ data/passerine.R | 36 +++++++++--------- 4 files changed, 83 insertions(+), 82 deletions(-) diff --git a/R/data.R b/R/data.R index c8f898b..e887416 100644 --- a/R/data.R +++ b/R/data.R @@ -241,8 +241,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 diff --git a/data/amphibio.R b/data/amphibio.R index 1965616..eae0711 100644 --- a/data/amphibio.R +++ b/data/amphibio.R @@ -27,16 +27,16 @@ attr(amphibio, 'metadata') <- traitdataform::as.metadata( ) attr(amphibio, 'thesaurus') <- traitdataform::as.thesaurus( - Fos = traitdataform::as.trait("Fos", + Fos = traitdataform::as.trait("Fossorial", expectedUnit = NA, valueType = "logical", identifier = NA), - Ter = traitdataform::as.trait("Ter", + Ter = traitdataform::as.trait("Terrestrial", expectedUnit = NA, valueType = "logical", identifier = NA), - Aqu = traitdataform::as.trait("Aqu", + Aqu = traitdataform::as.trait("Aquatic", expectedUnit = NA, valueType = "logical", identifier = NA), - Arb = traitdataform::as.trait("Arb", + Arb = traitdataform::as.trait("Arboreal", expectedUnit = NA, valueType = "logical", identifier = NA), @@ -56,26 +56,26 @@ attr(amphibio, 'thesaurus') <- traitdataform::as.thesaurus( expectedUnit = NA, valueType = "logical", identifier = NA), - Diu = traitdataform::as.trait("Diu", + Diu = traitdataform::as.trait("Diurnal", expectedUnit = NA, valueType = "logical", identifier = "http://purl.obolibrary.org/obo/VT_0001502"), - Noc = traitdataform::as.trait("Noc", + Noc = traitdataform::as.trait("Nocturnal", expectedUnit = NA, valueType = "logical", identifier = "http://purl.obolibrary.org/obo/VT_0001502"), - Crepu = traitdataform::as.trait("Crepu", + Crepu = traitdataform::as.trait("Crepuscular", expectedUnit = NA, valueType = "logical", identifier = "http://purl.obolibrary.org/obo/VT_0001502"), - Wet_warm = traitdataform::as.trait("Wet_warm", + Wet_warm = traitdataform::as.trait("Wet_warm_season", expectedUnit = NA, valueType = "logical", identifier = NA), - Wet_cold = traitdataform::as.trait("Wet_cold", + Wet_cold = traitdataform::as.trait("Wet_cold_season", expectedUnit = NA, valueType = "logical", identifier = NA), - Dry_warm = traitdataform::as.trait("Dry_warm", + Dry_warm = traitdataform::as.trait("Dry_warm_season", expectedUnit = NA, valueType = "logical", identifier = NA), - Dry_cold = traitdataform::as.trait("Dry_cold", + Dry_cold = traitdataform::as.trait("Dry_cold_season", expectedUnit = NA, valueType = "logical", identifier = NA), @@ -116,13 +116,13 @@ attr(amphibio, 'thesaurus') <- traitdataform::as.thesaurus( expectedUnit = "mm", valueType = "numeric", identifier = "http://ecologicaltraitdata.github.io/TraitDataList/Reproduction_mode"), - Dir = traitdataform::as.trait("Dir", + Dir = traitdataform::as.trait("Direct_development", expectedUnit = NA, valueType = "logical", identifier = NA), - Lar = traitdataform::as.trait("Lar", + Lar = traitdataform::as.trait("Larval__development", expectedUnit = NA, valueType = "logical", identifier = NA), - Viv = traitdataform::as.trait("Viv", + Viv = traitdataform::as.trait("Viviparous_development", expectedUnit = NA, valueType = "logical", identifier = NA) ) diff --git a/data/pantheria.R b/data/pantheria.R index b4d16f5..65a2ffd 100644 --- a/data/pantheria.R +++ b/data/pantheria.R @@ -27,114 +27,114 @@ license = "http://creativecommons.org/publicdomain/zero/1.0/" ) attr(pantheria, 'thesaurus') <- traitdataform::as.thesaurus( - X1.1_ActivityCycle = traitdataform::as.trait("X1.1_ActivityCycle", expectedUnit = NA, + 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("X5.1_AdultBodyMass_g", expectedUnit = "g", + 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("X8.1_AdultForearmLen_mm", expectedUnit = "mm", + X8.1_AdultForearmLen_mm = traitdataform::as.trait("Adult_Forearm_Length_mm", expectedUnit = "mm", valueType = "numeric"), - X13.1_AdultHeadBodyLen_mm = traitdataform::as.trait("X13.1_AdultHeadBodyLen_mm", expectedUnit = "mm", + X13.1_AdultHeadBodyLen_mm = traitdataform::as.trait("Adult_Body_Length_mm", expectedUnit = "mm", identifier = "http://ecologicaltraitdata.github.io/TraitDataList/Body_length", valueType = "numeric"), - X2.1_AgeatEyeOpening_d = traitdataform::as.trait("X2.1_AgeatEyeOpening_d", expectedUnit = "d", + X2.1_AgeatEyeOpening_d = traitdataform::as.trait("Age_at_Eye_Opening_d", expectedUnit = "d", valueType = "numeric"), - X3.1_AgeatFirstBirth_d = traitdataform::as.trait("X3.1_AgeatFirstBirth_d", expectedUnit = "d", + X3.1_AgeatFirstBirth_d = traitdataform::as.trait("Age_First_Birth_d", expectedUnit = "d", identifier = "http://ecologicaltraitdata.github.io/TraitDataList/Age_at_reproduction", valueType = "numeric"), - X18.1_BasalMetRate_mLO2hr = traitdataform::as.trait("X18.1_BasalMetRate_mLO2hr", expectedUnit = "mL.O2/hr", + X18.1_BasalMetRate_mLO2hr = traitdataform::as.trait("Basal_Metabolic_Rate_mLO2hr", expectedUnit = "mL.O2/hr", valueType = "numeric"), - X5.2_BasalMetRateMass_g = traitdataform::as.trait("X5.2_BasalMetRateMass_g", expectedUnit = "g", + X5.2_BasalMetRateMass_g = traitdataform::as.trait("Basal_Metabolic_Rate_Mass_g", expectedUnit = "g", valueType = "numeric"), - X6.1_DietBreadth = traitdataform::as.trait("X6.1_DietBreadth", expectedUnit = NA, + X6.1_DietBreadth = traitdataform::as.trait("Diet_Breadth", expectedUnit = NA, valueType = "integer"), - X7.1_DispersalAge_d = traitdataform::as.trait("X7.1_DispersalAge_d", expectedUnit = "d", + X7.1_DispersalAge_d = traitdataform::as.trait("Dispersal_Age_d", expectedUnit = "d", valueType = "numeric"), - X9.1_GestationLen_d = traitdataform::as.trait("X9.1_GestationLen_d", expectedUnit = "d", + X9.1_GestationLen_d = traitdataform::as.trait("Gestation_Length_d", expectedUnit = "d", valueType = "numeric"), - X12.1_HabitatBreadth = traitdataform::as.trait("X12.1_HabitatBreadth", expectedUnit = NA, + X12.1_HabitatBreadth = traitdataform::as.trait("Habitat_Breadth", expectedUnit = NA, valueType = "integer"), - X22.1_HomeRange_km2 = traitdataform::as.trait("X22.1_HomeRange_km2", expectedUnit = "km2", + X22.1_HomeRange_km2 = traitdataform::as.trait("Home_Range_km2", expectedUnit = "km2", valueType = "numeric"), - X22.2_HomeRange_Indiv_km2 = traitdataform::as.trait("X22.2_HomeRange_Indiv_km2", expectedUnit = "km2", + X22.2_HomeRange_Indiv_km2 = traitdataform::as.trait("HomeRange_Indiv_km2", expectedUnit = "km2", valueType = "numeric"), - X14.1_InterbirthInterval_d = traitdataform::as.trait("X14.1_InterbirthInterval_d", expectedUnit = "d", + X14.1_InterbirthInterval_d = traitdataform::as.trait("Interbirth_Interval_d", expectedUnit = "d", valueType = "numeric"), - X15.1_LitterSize = traitdataform::as.trait("X15.1_LitterSize", expectedUnit = NA, + X15.1_LitterSize = traitdataform::as.trait("Litter_Size", expectedUnit = NA, identifier = "http://ecologicaltraitdata.github.io/TraitDataList/Reproduction_mode", valueType = "numeric"), - X16.1_LittersPerYear = traitdataform::as.trait("X16.1_LittersPerYear", expectedUnit = "m", + X16.1_LittersPerYear = traitdataform::as.trait("Litters_Per_Year", expectedUnit = "m", valueType = "numeric"), - X17.1_MaxLongevity_m = traitdataform::as.trait("X17.1_MaxLongevity_m", expectedUnit = "m", + X17.1_MaxLongevity_m = traitdataform::as.trait("Lifespan_max_m", expectedUnit = "m", identifier = "http://ecologicaltraitdata.github.io/TraitDataList/Life_span_potential", valueType = "numeric"), - X5.3_NeonateBodyMass_g = traitdataform::as.trait("X5.3_NeonateBodyMass_g", expectedUnit = "g", + 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("X13.2_NeonateHeadBodyLen_mm", expectedUnit = "mm", + X13.2_NeonateHeadBodyLen_mm = traitdataform::as.trait("Neonate_Body_Length_mm", expectedUnit = "mm", valueType = "numeric"), - X21.1_PopulationDensity_n.km2 = traitdataform::as.trait("X21.1_PopulationDensity_n.km2", expectedUnit = "n/km2", + X21.1_PopulationDensity_n.km2 = traitdataform::as.trait("Population_Density_n.km2", expectedUnit = "n/km2", valueType = "numeric"), - X10.1_PopulationGrpSize = traitdataform::as.trait("X10.1_PopulationGrpSize", expectedUnit = NA, + X10.1_PopulationGrpSize = traitdataform::as.trait("Population_Group_Size", expectedUnit = NA, valueType = "numeric"), - X23.1_SexualMaturityAge_d = traitdataform::as.trait("X23.1_SexualMaturityAge_d", expectedUnit = "d", + X23.1_SexualMaturityAge_d = traitdataform::as.trait("Sexual_Maturity_Age_d", expectedUnit = "d", identifier = "http://ecologicaltraitdata.github.io/TraitDataList/Development", valueType = "numeric"), - X10.2_SocialGrpSize = traitdataform::as.trait("X10.2_SocialGrpSize", expectedUnit = NA, + X10.2_SocialGrpSize = traitdataform::as.trait("Social_Group_Size", expectedUnit = NA, valueType = "numeric"), - X24.1_TeatNumber = traitdataform::as.trait("X24.1_TeatNumber", expectedUnit = NA, + X24.1_TeatNumber = traitdataform::as.trait("Teat_Number", expectedUnit = NA, valueType = "numeric"), - X12.2_Terrestriality = traitdataform::as.trait("X12.2_Terrestriality", expectedUnit = NA, + X12.2_Terrestriality = traitdataform::as.trait("Terrestriality", expectedUnit = NA, valueType = "factor"), - X6.2_TrophicLevel = traitdataform::as.trait("X6.2_TrophicLevel", expectedUnit = NA, + X6.2_TrophicLevel = traitdataform::as.trait("Trophic_Level", expectedUnit = NA, identifier = " http://ecologicaltraitdata.github.io/TraitDataList/feeding", valueType = "factor"), - X25.1_WeaningAge_d = traitdataform::as.trait("X25.1_WeaningAge_d", expectedUnit = "d", + X25.1_WeaningAge_d = traitdataform::as.trait("Weaning_Age_d", expectedUnit = "d", valueType = "numeric"), - X5.4_WeaningBodyMass_g = traitdataform::as.trait("X5.4_WeaningBodyMass_g", expectedUnit = "g", + X5.4_WeaningBodyMass_g = traitdataform::as.trait("Weaning_Body_Mass_g", expectedUnit = "g", valueType = "numeric"), - X13.3_WeaningHeadBodyLen_mm = traitdataform::as.trait("X13.3_WeaningHeadBodyLen_mm", expectedUnit = "mm", + X13.3_WeaningHeadBodyLen_mm = traitdataform::as.trait("Weaning_Body_Length_mm", expectedUnit = "mm", valueType = "numeric"), - X5.5_AdultBodyMass_g_EXT = traitdataform::as.trait("X5.5_AdultBodyMass_g_EXT", expectedUnit = "g", + 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_EXT", expectedUnit = "g", + 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_EXT", expectedUnit = "g", + 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_EXT", expectedUnit = "g", + 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("X26.1_GR_Area_km2", expectedUnit = "km2", + X26.1_GR_Area_km2 = traitdataform::as.trait("Geo_Range_Area_km2", expectedUnit = "km2", valueType = "numeric"), - X26.2_GR_MaxLat_dd = traitdataform::as.trait("X26.2_GR_MaxLat_dd", expectedUnit = "degrees", + X26.2_GR_MaxLat_dd = traitdataform::as.trait("Geo_Range_MaxLat_dd", expectedUnit = "degrees", valueType = "numeric"), - X26.3_GR_MinLat_dd = traitdataform::as.trait("X26.3_GR_MinLat_dd", expectedUnit = "degrees", + X26.3_GR_MinLat_dd = traitdataform::as.trait("Geo_Range_MinLat_dd", expectedUnit = "degrees", valueType = "numeric"), - X26.4_GR_MidRangeLat_dd = traitdataform::as.trait("X26.4_GR_MidRangeLat_dd", expectedUnit = "degrees", + X26.4_GR_MidRangeLat_dd = traitdataform::as.trait("Mid_Geo_RangeLat_dd", expectedUnit = "degrees", valueType = "numeric"), - X26.5_GR_MaxLong_dd = traitdataform::as.trait("X26.5_GR_MaxLong_dd", expectedUnit = "degrees", + X26.5_GR_MaxLong_dd = traitdataform::as.trait("Geo_Range_MaxLong_dd", expectedUnit = "degrees", valueType = "numeric"), - X26.6_GR_MinLong_dd = traitdataform::as.trait("X26.6_GR_MinLong_dd", expectedUnit = "degrees", + X26.6_GR_MinLong_dd = traitdataform::as.trait("Geo_Range_MinLong_dd", expectedUnit = "degrees", valueType = "numeric"), - X26.7_GR_MidRangeLong_dd = traitdataform::as.trait("X26.7_GR_MidRangeLong_dd", expectedUnit = "degrees", + 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("X27.1_HuPopDen_Min_n.km2", expectedUnit = "n/km2", + 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("X27.2_HuPopDen_Mean_n.km2", expectedUnit = "n/km2", + 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("X27.3_HuPopDen_5p_n.km2", expectedUnit = "n/km2", + 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("X27.4_HuPopDen_Change", expectedUnit = NA, + X27.4_HuPopDen_Change = traitdataform::as.trait("Human_PopDensity_Change", expectedUnit = NA, valueType = "numeric"), - X28.1_Precip_Mean_mm = traitdataform::as.trait("X28.1_Precip_Mean_mm", expectedUnit = "mm", + X28.1_Precip_Mean_mm = traitdataform::as.trait("Precipitation_Mean_mm", expectedUnit = "mm", valueType = "numeric"), - X28.2_Temp_Mean_01degC = traitdataform::as.trait("X28.2_Temp_Mean_01degC", expectedUnit = "degreeC", + X28.2_Temp_Mean_01degC = traitdataform::as.trait("Temperature_Mean_01degC", expectedUnit = "degC", identifier = "http://ecologicaltraitdata.github.io/TraitDataList/Ecological_niche", valueType = "numeric"), - X30.1_AET_Mean_mm = traitdataform::as.trait("X30.1_AET_Mean_mm", expectedUnit = "mm", + 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("X30.2_PET_Mean_mm", expectedUnit = "mm", + X30.2_PET_Mean_mm = traitdataform::as.trait("Potential_Evapotranspiration_Rate_Mean_mm", expectedUnit = "mm", valueType = "numeric") ) diff --git a/data/passerine.R b/data/passerine.R index c03c548..01ad263 100644 --- a/data/passerine.R +++ b/data/passerine.R @@ -29,40 +29,42 @@ attr(passerine, 'metadata') <- traitdataform::as.metadata( 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", expectedUnit = "mm", valueType = "numeric", + Wing = traitdataform::as.trait("Wing_length", expectedUnit = "mm", valueType = "numeric", identifier = "http://ecologicaltraitdata.github.io/TraitDataList/Locomotion_morphology"), - Tail = traitdataform::as.trait("Tail", expectedUnit = "mm", valueType = "numeric", + Tail = traitdataform::as.trait("Tail_length", expectedUnit = "mm", valueType = "numeric", identifier = NA), - Tarsus = traitdataform::as.trait("Tarsus", expectedUnit = "mm", valueType = "numeric", + Tarsus = traitdataform::as.trait("Tarsus_length", expectedUnit = "mm", valueType = "numeric", identifier = NA), - Toe = traitdataform::as.trait("Toe", expectedUnit = "mm", valueType = "numeric", + Toe = traitdataform::as.trait("Toe_length", expectedUnit = "mm", valueType = "numeric", identifier = NA), - BillL = traitdataform::as.trait("Bill L", expectedUnit = "mm", valueType = "numeric", + `Bill L` = traitdataform::as.trait("BillLength", expectedUnit = "mm", valueType = "numeric", identifier = NA), - BillW = traitdataform::as.trait("Bill W", expectedUnit = "mm", valueType = "numeric", + `Bill W` = traitdataform::as.trait("BillWidth", expectedUnit = "mm", valueType = "numeric", identifier = NA), - BillD = traitdataform::as.trait("Bill D", expectedUnit = "mm", valueType = "numeric", + `Bill D` = traitdataform::as.trait("BillDepth", expectedUnit = "mm", valueType = "numeric", identifier = NA), - HN = traitdataform::as.trait("HN", expectedUnit = "mm", valueType = "logic", + HN = traitdataform::as.trait("Nearctic", expectedUnit = "unitless", valueType = "logic", identifier = NA), - N = traitdataform::as.trait("N", expectedUnit = "mm", valueType = "logic", + N = traitdataform::as.trait("Neotropics", expectedUnit = "unitless", valueType = "logic", identifier = NA), - NI = traitdataform::as.trait("NI", expectedUnit = "mm", valueType = "logic", + NI = traitdataform::as.trait("Neotropical_Islands", expectedUnit = "unitless", valueType = "logic", identifier = NA), - HP = traitdataform::as.trait("HP", expectedUnit = "mm", valueType = "logic", + HP = traitdataform::as.trait("Palearctic", expectedUnit = "unitless", valueType = "logic", identifier = NA), - E = traitdataform::as.trait("EI", expectedUnit = "mm", valueType = "logic", + E = traitdataform::as.trait("Ethiopian", expectedUnit = "unitless", valueType = "logic", identifier = NA), - O = traitdataform::as.trait("O", expectedUnit = "mm", valueType = "logic", + EI = traitdataform::as.trait("African_Islands", expectedUnit = "unitless", valueType = "logic", identifier = NA), - OI = traitdataform::as.trait("OI", expectedUnit = "mm", valueType = "logic", + O = traitdataform::as.trait("Oriental", expectedUnit = "unitless", valueType = "logic", identifier = NA), - AU = traitdataform::as.trait("AU", expectedUnit = "mm", valueType = "logic", + OI = traitdataform::as.trait("Oriental_Islands", expectedUnit = "unitless", valueType = "logic", identifier = NA), - AZ = traitdataform::as.trait("AZ", expectedUnit = "mm", valueType = "logic", + AU = traitdataform::as.trait("Australia", expectedUnit = "unitless", valueType = "logic", identifier = NA), - AI = traitdataform::as.trait("AI", expectedUnit = "mm", valueType = "logic", + New_Zealand = traitdataform::as.trait("AZ", expectedUnit = "unitless", valueType = "logic", + identifier = NA), + AI = traitdataform::as.trait("Australia", expectedUnit = "unitless", valueType = "logic", identifier = NA) ) From 560e9e4359eb758a79068fe8ee19a672c1a7a07a Mon Sep 17 00:00:00 2001 From: caterinap Date: Wed, 29 Nov 2017 14:35:39 +0100 Subject: [PATCH 21/22] Changed arthropodtraits + minor --- R/data.R | 22 +++++++++----- data/amphibio.R | 2 +- data/arthropodtraits.R | 65 +++++++++++++++++++++++++++++++++++------- data/pantheria.R | 1 + 4 files changed, 71 insertions(+), 19 deletions(-) diff --git a/R/data.R b/R/data.R index e887416..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 #' diff --git a/data/amphibio.R b/data/amphibio.R index eae0711..281f3b7 100644 --- a/data/amphibio.R +++ b/data/amphibio.R @@ -128,7 +128,7 @@ attr(amphibio, 'thesaurus') <- traitdataform::as.thesaurus( ) attr(amphibio, 'taxa') <- "Species" -attr(amphibio, 'keep') <- c(measurementRemarks = "OBS") +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/pantheria.R b/data/pantheria.R index 65a2ffd..b4469ca 100644 --- a/data/pantheria.R +++ b/data/pantheria.R @@ -139,6 +139,7 @@ attr(pantheria, 'thesaurus') <- traitdataform::as.thesaurus( ) attr(pantheria, 'taxa') <- "MSW05_Binomial" +attr(pantheria, 'taxa') <- (basisOfRecord = "literatureData") print(attributes(pantheria)$metadata) \ No newline at end of file From 3ff7c6ca2340ae403cd0ffc2b36649970638a9a8 Mon Sep 17 00:00:00 2001 From: caterinap Date: Thu, 30 Nov 2017 10:54:17 +0100 Subject: [PATCH 22/22] Updated URIs --- data/amniota.R | 14 +++++++------- data/amphibio.R | 22 +++++++++++----------- data/heteroptera_raw.R | 18 +++++++++--------- data/pantheria.R | 12 +++++------- data/passerine.R | 4 ++-- 5 files changed, 34 insertions(+), 36 deletions(-) diff --git a/data/amniota.R b/data/amniota.R index 95bde2b..8a5f738 100644 --- a/data/amniota.R +++ b/data/amniota.R @@ -26,7 +26,7 @@ attr(amniota, 'metadata') <- traitdataform::as.metadata( 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"), + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/#Development"), litter_or_clutch_size_n = traitdataform::as.trait("litter_or_clutch_size_n", valueType = "numeric", @@ -42,7 +42,7 @@ attr(amniota, 'thesaurus') <- traitdataform::as.thesaurus( maximum_longevity_y = traitdataform::as.trait("maximum_longevity_y", expectedUnit = "a", valueType = "numeric", - identifier = "http://ecologicaltraitdata.github.io/TraitDataList/Life_span_potential"), + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/#Life_span_potential"), gestation_d = traitdataform::as.trait("gestation_d", expectedUnit = "d", valueType = "numeric", @@ -62,7 +62,7 @@ attr(amniota, 'thesaurus') <- traitdataform::as.thesaurus( egg_mass_g = traitdataform::as.trait("egg_mass_g", expectedUnit = "g", valueType = "numeric", - identifier = "http://ecologicaltraitdata.github.io/TraitDataList/Egg_biomass"), + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/#Egg_biomass"), incubation_d = traitdataform::as.trait("incubation_d", expectedUnit = "d", valueType = "numeric", @@ -78,7 +78,7 @@ attr(amniota, 'thesaurus') <- traitdataform::as.thesaurus( male_maturity_d = traitdataform::as.trait("male_maturity_d", expectedUnit = "d", valueType = "numeric", - identifier = "http://ecologicaltraitdata.github.io/TraitDataList/Development"), + 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", @@ -98,11 +98,11 @@ attr(amniota, 'thesaurus') <- traitdataform::as.thesaurus( egg_width_mm = traitdataform::as.trait("egg_width_mm", expectedUnit = "mm", valueType = "numeric", - identifier = "http://ecologicaltraitdata.github.io/TraitDataList/Egg_size"), + 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"), + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/#Egg_size"), fledging_mass_g = traitdataform::as.trait("fledging_mass_g", expectedUnit = "g", valueType = "numeric", @@ -138,7 +138,7 @@ attr(amniota, 'thesaurus') <- traitdataform::as.thesaurus( no_sex_maturity_d = traitdataform::as.trait("no_sex_maturity_d", expectedUnit = "d", valueType = "numeric", - identifier = "http://ecologicaltraitdata.github.io/TraitDataList/Development") + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/#Development") ) attr(amniota, 'taxa') <- "taxa" diff --git a/data/amphibio.R b/data/amphibio.R index 281f3b7..a0ffc1b 100644 --- a/data/amphibio.R +++ b/data/amphibio.R @@ -84,37 +84,37 @@ attr(amphibio, 'thesaurus') <- traitdataform::as.thesaurus( 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 = " http://ecologicaltraitdata.github.io/TraitDataList/Age_at_maturity"), + 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 = "http://ecologicaltraitdata.github.io/TraitDataList/Age_at_maturity"), + 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"), + 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"), + 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"), + 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"), + 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"), + 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"), + 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"), + 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"), + 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"), + identifier = "http://ecologicaltraitdata.github.io/TraitDataList/#Reproduction_mode"), Dir = traitdataform::as.trait("Direct_development", expectedUnit = NA, valueType = "logical", diff --git a/data/heteroptera_raw.R b/data/heteroptera_raw.R index fb6d477..49b62b8 100644 --- a/data/heteroptera_raw.R +++ b/data/heteroptera_raw.R @@ -47,15 +47,15 @@ attr(heteroptera_raw, 'thesaurus') <- traitdataform::as.thesaurus( 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"), + 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"), + 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"), + 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"), + 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"), + 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", @@ -67,13 +67,13 @@ attr(heteroptera_raw, 'thesaurus') <- traitdataform::as.thesaurus( 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"), + 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"), + 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"), + 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"), + 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", diff --git a/data/pantheria.R b/data/pantheria.R index b4469ca..076bbc3 100644 --- a/data/pantheria.R +++ b/data/pantheria.R @@ -36,12 +36,12 @@ attr(pantheria, 'thesaurus') <- traitdataform::as.thesaurus( 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 = "http://ecologicaltraitdata.github.io/TraitDataList/Body_length", + 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 = "http://ecologicaltraitdata.github.io/TraitDataList/Age_at_reproduction", + 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"), @@ -62,12 +62,12 @@ attr(pantheria, 'thesaurus') <- traitdataform::as.thesaurus( 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 = "http://ecologicaltraitdata.github.io/TraitDataList/Reproduction_mode", + 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 = "http://ecologicaltraitdata.github.io/TraitDataList/Life_span_potential", + 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", @@ -79,7 +79,7 @@ attr(pantheria, 'thesaurus') <- traitdataform::as.thesaurus( 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 = "http://ecologicaltraitdata.github.io/TraitDataList/Development", + identifier = "https://ecologicaltraitdata.github.io/TraitDataList/#Development", valueType = "numeric"), X10.2_SocialGrpSize = traitdataform::as.trait("Social_Group_Size", expectedUnit = NA, valueType = "numeric"), @@ -88,7 +88,6 @@ attr(pantheria, 'thesaurus') <- traitdataform::as.thesaurus( X12.2_Terrestriality = traitdataform::as.trait("Terrestriality", expectedUnit = NA, valueType = "factor"), X6.2_TrophicLevel = traitdataform::as.trait("Trophic_Level", expectedUnit = NA, - identifier = " http://ecologicaltraitdata.github.io/TraitDataList/feeding", valueType = "factor"), X25.1_WeaningAge_d = traitdataform::as.trait("Weaning_Age_d", expectedUnit = "d", valueType = "numeric"), @@ -130,7 +129,6 @@ attr(pantheria, 'thesaurus') <- traitdataform::as.thesaurus( 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", - identifier = "http://ecologicaltraitdata.github.io/TraitDataList/Ecological_niche", valueType = "numeric"), X30.1_AET_Mean_mm = traitdataform::as.trait("Actual_Evapotranspiration_Rate_Mean_mm", expectedUnit = "mm", valueType = "numeric"), diff --git a/data/passerine.R b/data/passerine.R index 01ad263..8f6df20 100644 --- a/data/passerine.R +++ b/data/passerine.R @@ -28,9 +28,9 @@ attr(passerine, 'metadata') <- traitdataform::as.metadata( attr(passerine, 'thesaurus') <- traitdataform::as.thesaurus( Length = traitdataform::as.trait("Length", expectedUnit = "mm", valueType = "numeric", - identifier = "http://ecologicaltraitdata.github.io/TraitDataList/Body_length"), + 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"), + 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",