Skip to contents

Functions to check that the input data frame (trait table or allometry table) has the appropriate format and data for model parameter filling.

Usage

check_harmonized_trait(x)

check_harmonized_allometry(x)

Arguments

x

A data frame with harmonized trait data or harmonized allometry data

Value

An (invisible) logical indicating whether the data frame is acceptable or not.

Details

Function check_harmonized_trait() checks that the input data frame conforms to the following requirements:

  • Has columns called originalName, acceptedName, acceptedNameAuthorship, family, genus, specificEpithet, and taxonRank, as returned by function harmonize_taxonomy_WFO.

  • The names of the remaining columns are "Units", "Reference", "DOI", "Priority" or a valid trait name according to the notation required in HarmonizedTraitDefinition.

  • For trait columns, their values conform to the required type in HarmonizedTraitDefinition.

  • Trait columns contain non-missing data.

  • Numeric trait columns do not contain values beyond expected ranges (when defined).

Function check_harmonized_allometry() checks that the input data frame conforms to the following requirements:

  • Has columns called originalName, acceptedName, acceptedNameAuthorship, family, genus, specificEpithet, and taxonRank, as returned by function harmonize_taxonomy_WFO.

  • Has columns called "Response" and "Equation". Columns "Priority", "Reference" and "DOI" are recommended.

  • Column "Response" identifies the response variable.

  • Column "ResponseDescription" contains a longer description of the response variable.

  • Columns "Predictor1", "Predictor2", ... identify predictor variables.

  • Columns "PredictorDescription1", "PredictorDescription2", ... contain longer descriptions of predictor variables.

  • Allometry coefficient columns should be named "a", "c", "c", ..., "f" and contain numeric values.