Skip to contents

Functions to load harmonized trait data and harmonized allometry data

Usage

load_harmonized_trait_tables(harmonized_trait_path, progress = TRUE)

load_harmonized_allometry_tables(harmonized_allometry_path, progress = TRUE)

get_trait_data(
  harmonized_trait_path,
  trait_name,
  is_numeric = TRUE,
  progress = TRUE
)

get_allometry_data(harmonized_allometry_path, response, progress = TRUE)

get_taxon_data(harmonized_trait_path, accepted_name, progress = TRUE)

Arguments

harmonized_trait_path

The path to harmonized trait data files (.rds or .csv format).

progress

A boolean flag to prompt progress.

harmonized_allometry_path

The path to harmonized allometry data files (.rds or .csv format).

trait_name

A string of an accepted trait name

is_numeric

A boolean indicating whether the trait is numeric

response

String indicating a response variable for allometric equations.

accepted_name

String of an accepted taxon name.

Value

Function load_harmonized_trait_tables() returns the list with all harmonized trait data tables.

Function load_harmonized_allometry_tables() returns the list with all harmonized allometry data tables.

Function get_trait_data() returns a data frame with the pooled information of a single trait.

Function get_taxon_data() returns a data frame with the pooled information for a given taxon.

Details

Both functions will add Priority = 1 to those trait data sources where Priority column is not defined.

Examples

if (FALSE) { # \dontrun{
 # List harmonized trait files
 harmonized_trait_path = "~/OneDrive/EMF_datasets/PlantTraitDatabases/Products/harmonized"
 list.files(path = harmonized_trait_path)

 # Load all harmonized trait data
 l <- load_harmonized_trait_tables(harmonized_trait_path)
 head(l[[1]])

 # Get data for one specific trait
 get_trait_data(harmonized_trait_path, "SLA")

 # Get trait data for one specific taxon
 get_taxon_data(harmonized_trait_path, "Pinus halepensis")

 # List harmonized allometry files
 harmonized_allometry_path = "~/OneDrive/EMF_datasets/AllometryDatabases/Products/harmonized"
 list.files(path = harmonized_allometry_path)

 # Load all harmonized allometry data
 l <- load_harmonized_allometry_tables(harmonized_allometry_path)
 head(l[[1]])

 # Get allometry data for one specific response
 get_allometry_data(harmonized_allometry_path, "FoliarBiomass")
} # }