Skip to contents

Fetches trait data for a given plant species from the BIEN database, cleans it, and merges multiple traits into a single dataframe.

Usage

build_trait_data_BIEN(
  species,
  traits,
  remove_outliers = FALSE,
  outlier_threshold = 3,
  author_info = FALSE,
  max_retries = 3
)

Arguments

species

A character string specifying the species of interest.

traits

A character vector specifying the trait names to retrieve from BIEN. Possible traits include:

  • "diameter at breast height (1.3 m) (cm)"

  • "flower color"

  • "flower pollination syndrome"

  • "fruit type"

  • "inflorescence length"

  • "leaf area (mm2)"

  • "leaf area per leaf dry mass (m2.kg-1)"

  • "leaf carbon content per leaf dry mass (mg.g-1)"

  • "leaf carbon content per leaf nitrogen content"

  • "leaf compoundness"

  • "leaf dry mass (g)"

  • "leaf dry mass per leaf fresh mass (mg.g-1)"

  • "leaf fresh mass"

  • "Leaf lamina fracture toughness"

  • "leaf life span (months)"

  • "leaf nitrogen content per leaf area (kg.m-2)"

  • "leaf nitrogen content per leaf dry mass (mg.g-1)"

  • "leaf phosphorus content per leaf area (g.m-2)"

  • "leaf phosphorus content per leaf dry mass (mg.g-1)"

  • "leaf photosynthetic rate per leaf area (µmol.m-2.s-1)"

  • "leaf photosynthetic rate per leaf dry mass (µmol.g-1.s-1)"

  • "leaf relative growth rate"

  • "leaf stomatal conductance for H2O per leaf area (mol.H2O.m-2.s-1)"

  • "leaf stomatal conductance per leaf area"

  • "leaf thickness"

  • "longest whole plant longevity (years)"

  • "maximum fruit length"

  • "maximum leaf length"

  • "maximum leaf width"

  • "maximum whole plant height"

  • "maximum whole plant longevity"

  • "minimum fruit length"

  • "minimum leaf length"

  • "minimum leaf width"

  • "minimum whole plant height"

  • "plant flowering begin (month)"

  • "plant flowering duration (month)"

  • "plant fruiting duration"

  • "root dry mass"

  • "seed length"

  • "seed mass (mg)"

  • "stem dry mass"

  • "stem relative growth rate"

  • "stem wood density (g.cm-3)"

  • "vessel lumen area (mm2)"

  • "vessel number (vessels mm-2)"

  • "whole plant dispersal syndrome"

  • "whole plant growth form"

  • "whole plant growth form diversity"

  • "whole plant height (m)"

  • "whole plant primary juvenile period length (years)"

  • "whole plant sexual system"

  • "whole plant vegetative phenology"

  • "whole plant woodiness"

remove_outliers

Logical. If TRUE, removes outliers based on a specified threshold. Default is FALSE.

outlier_threshold

Numeric. The number of standard deviations from the mean to classify a value as an outlier. Default is 3.

author_info

Logical. If TRUE, it includes authorship and contact information for data collection. Default is FALSE.

Value

A dataframe containing the cleaned trait data with columns: scrubbed_species_binomial and one column per requested trait. Optional columns include: project_pi and project_pi_contacts.

Details

BIEN pulls from a wide variety of trait databases, making it more likely to include information on a broader range of species compared to region-specific databases. For example, the LEDA trait database (Northwestern European specific) has both SLA and seed mass data for 8 total species beloning to the Acer and Pinus genera; the BIEN trait database has SLA and seed mass data for 27 species beloning to the same genera.

Examples

if (FALSE) { # \dontrun{
trait_df <- build_trait_data_BIEN(species = "Pinus strobus", traits = c("leaf area per leaf dry mass", "seed mass"), remove_outliers = TRUE, outlier_threshold = 2)

print(trait_df)
} # }