validate_treelist: Validate treelist

Description Usage Arguments Details Value

View source: R/validate_inputs.R

Description

Load, validate, and prepare a treelist for each plot. This function checks that the treelist dataframe is properly formatted, and returns a properly-typed tidy data frame with a row for each individual tree, and columns for relevant identifiers or measurements.

Usage

1
validate_treelist(trees_data)

Arguments

trees_data

A tidy dataframe with the treelist (as described above).

Details

The treelist dataframe must have a row for each observation of each individual tree, and at least these columns:

plot_id

Plot ids must be unique plot identifiers. (E.g., if you have a nested study design with "stand A plot 1" and "stand B plot 1", use "A1" and "B1" as PlotIDs.) There may be multiple inventory dates per plot_id, or multiple transects sharing a plot_id. There will likely be multiple trees per plot_id (that is, multiple rows will share a single plot_id.)

inv_date

The date of measurement, in mm/dd/YYYY format. There must be a 1:1 match between the dates of fuels measurements and dates of trees data. (plot_id:inv_date) must uniquely identify a sampling event in both the fuels and the trees data.

species

A species identifier code for the individual tree. Generally follows 4-letter scientific abbreviation format (e.g. Abies concolor is "ABCO", not "WF", "White fir", "Abies_concolor", etc.). Compare your species codes to those included in the Van Wagtendonk constant tables (try "species_codes" in console) to ensure correct matching. Note that singleleaf pinyon (Pinus monophylla) and western white pine (Pinus monticola) would share the code "PIMO" - these should be labeled "PIMO1" and "PIMO2", respectively.

dbh_cm

The diameter at breast height (4.5', 1.37m) of the tree in centimeters.

Value

A tidy dataframe with the treelist. This is primarily a validation function - the format and meaning of the data frame should match that of the import dataframe.


danfosterfire/Rfuels documentation built on May 28, 2019, 11:04 p.m.