Skip to contents

Build a dataframe of trait data for various plant species of interest using LEDA trait database.

Usage

build_trait_data_LEDA(columns_to_select, genera = NULL)

Arguments

columns_to_select

A character vector specifying one or more trait columns to include in the output. Valid options are: "SLA" (specific leaf area, mm^2/mg), "seed_mass" (mg), "leaf_mass" (mg), and "canopy_height" (m). The function will return an error if any specified columns are not available.

genera

Optional character vector specifying genera to filter by. If NULL (default), no filtering is applied. Genera are matched by underscore notation in species names (e.g., "Acer_" matches Acer species).

Value

A dataframe including mean trait data for all species or species of choice in respective columns titled by trait name.

Details

The function reads trait data from four different data files, including SLA (Specific Leaf Area), seed mass, leaf mass, and canopy height. It then combines these data frames into a single data frame based on the species name.

References

Kleyer M, et al. (2008). “The LEDA Traitbase: a database of life-history traits of the Northwest European Flora.” Journal of Ecology. doi:10.1111/j.1365-2745.2008.01430.x .

Author

Alivia G Nytko, anytko@vols.utk.edu

Examples


# Build dataframe using specific leaf area (SLA) trait data across all available species
all_traits <- build_trait_data(columns_to_select = "SLA")
#> Error in build_trait_data(columns_to_select = "SLA"): could not find function "build_trait_data"

# Build dataframe using seed mass trait data across maple species
maple_traits <- build_trait_data(columns_to_select = "seed_mass", genera = "Acer_")
#> Error in build_trait_data(columns_to_select = "seed_mass", genera = "Acer_"): could not find function "build_trait_data"
print(maple_traits)
#> Error: object 'maple_traits' not found

# Build dataframe using canopy height for major tree species
tree_traits <- build_trait_data_LEDA(columns_to_select = "canopy_height", genera = c("Acer_", "Quercus_", "Populus_", "Ulmus_", "Pinus_", "Alnus_", "Betula_", "Salix_", "Abies_", "Fraxinus_", "Tsuga_", "Prunus_"))
print(tree_traits)
#> # A tibble: 105 × 2
#>    species_name        canopy_height
#>    <chr>                       <dbl>
#>  1 Abies_alba                   50  
#>  2 Abies_grandis                50  
#>  3 Abies_nordmanniana           30  
#>  4 Acer_campestre               13.4
#>  5 Acer_monspessulanum          11  
#>  6 Acer_negundo                 11.5
#>  7 Acer_opalus                  12  
#>  8 Acer_platanoides             26.2
#>  9 Acer_pseudoplatanus          27.3
#> 10 Acer_saccharinum             40  
#> # ℹ 95 more rows