validate_fuels: Validate fuels data

Description Usage Arguments Details Value

View source: R/validate_inputs.R

Description

Load, validate, and prepare fuels data. This function checks a data frame containing the observations from the Brown's transects. We test whether all necessary columns are present and labeled correctly, and return a properly-typed tidy data frame with the observed data.

Usage

1
validate_fuels(fuels_data)

Arguments

fuels_data

A tidy data frame containing the observations from the Brown's transects for surface fuels. Must meet the requirements described above.

Details

The source data frame must have a row for each Brown's transect, 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 "A-1" and "B-1" as PlotIDs.) There may be multiple inventory dates per plot_id, or multiple transects sharing a 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.

azimuth

Integer in the range 0-359 (inclusive) giving the azimuth from plot center for the transect. Identifier for individual transects within plots. Must be unique within a (plot_id:inv_date). Will be coerced to character.

x1h_length_m, x10h_length_m, x100h_length_m, x1000h_length_m

Numeric(s) greater than 0. The length (in meters) of the sampling transects for 1-hour, 10-hour, 100-hour, and 1000-hour fuels, respectively. Transect lengths may vary by plot_id and/or year, for example if sampling protocols changed over time or called to extend 1000-hour transects until at least one intersection was found.

count_x1h, count_x10h, count_x100h

Integers greater than or equal to 0. Transect counts of the number of intersections for 1-, 10-, and 100-hour fuels, respectively.

duff_depth and litter_depth

Numeric greater than 0. Average depth of duff / litter (in cm) on the transect. Users with multiple measurements per transect of litter and/or duff should average them together before import. Depths must be recorded in cm.

sum_d2_1000r_cm2 and sum_d2_1000s_cm2

The sum-of-squared-diameters for 1000-hour fuels on the transect, for rotten and sound fuels respectively. Users must aggregate their large fuels (1000-hour) into sound or rotten classes, and sum the squared diameters (in cm) for all 1000-s or 1000-r intersections on the transect.

Additionally, the .csv file may have a column for 'slope_percent', the slope (in percent) along the transect. Brown's equations include the option to correct for the slope effect on horizontal length of transects. Keep in mind that this correction factor applies to the transect slope, not the plot slope. If a slope_percent is not supplied, we set the slope correction factor to 1 (no slope).

Value

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


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