Package 'BerkeleyForestsAnalytics'

Title: Compute and Summarize Core Forest Metrics from Field Data
Description: A suite of open-source R functions designed to produce standard metrics for forest management and ecology from forest inventory data. The overarching goal is to minimize potential inconsistencies introduced by the algorithms used to compute and summarize core forest metrics. Learn more about the purpose of the package and the specific algorithms used in the package at <https://github.com/kearutherford/BerkeleyForestsAnalytics>.
Authors: Kea Rutherford [aut, cre], John Battles [aut], Danny Foster [aut], The Regents of the University of California (Regents) [cph]
Maintainer: Kea Rutherford <[email protected]>
License: file LICENSE
Version: 2.0.4
Built: 2025-01-10 23:07:31 UTC
Source: CRAN

Help Index


Data for biomass demonstrations

Description

A fake dataset created for biomass demonstration purposes only

Usage

bio_demo_data

Format

A dataframe with 9 rows and 7 columns:

Forest

Broader location or forest where the data were collected

Plot_id

Plot in which the individual tree was measured

SPH

Stems per hectare

Live

Live (1) or dead (0)

Decay

1-5 for standing dead trees. NA for live trees.

SPP

Species of the individual tree, using four-letter species codes

DBH_CM

Diameter at breast height in centimeters

HT_M

Tree height in meters

Source

Created by Kea Rutherford for demonstration purposes


Data for biomass demonstrations

Description

A fake dataset created for biomass demonstration purposes only. Includes a plot without trees.

Usage

bio_NT_demo

Format

A dataframe with 9 rows and 7 columns:

Forest

Broader location or forest where the data were collected

Plot_id

Plot in which the individual tree was measured

SPH

Stems per hectare

Live

Live (1) or dead (0)

Decay

1-5 for standing dead trees. NA for live trees.

SPP

Species of the individual tree, using four-letter species codes

DBH_CM

Diameter at breast height in centimeters

HT_M

Tree height in meters

Source

Created by Kea Rutherford for demonstration purposes


BiomassNSVB

Description

Uses the national-scale volume and biomass (NSVB) framework, from GTR-WO-104, to estimate above-ground tree biomass and carbon. The package will summarize to the tree or plot level, with options to additionally summarize by species and/or status. The package is specifically designed for use in California ecosystems, and, therefore, only covers the ecodivisions found in California (260, M260, 320, and 340).

Usage

BiomassNSVB(
  data,
  sp_codes = "4letter",
  input_units = "metric",
  output_units = "metric",
  results = "by_plot"
)

Arguments

data

A dataframe or tibble with the following columns: division, province, site, plot, exp_factor, status, decay_class, species, dbh, ht1, ht2, crown_ratio, top, and cull. Each row must be an observation of an individual tree.

sp_codes

Not a variable (column) in the provided dataframe or tibble. Specifies whether the species variable follows the four-letter code or FIA naming convention (see README file for more detail). Must be set to either "4letter" or "fia". The default is set to "4letter".

input_units

Not a variable (column) in the provided dataframe or tibble. Specifies (1) whether the input dbh, ht1, and ht2 variables were measured using metric (centimeters and meters) or imperial (inches and feet) units; and (2) whether the input expansion factor is in metric (stems per hectare) or imperial (stems per acre) units. Must be set to either "metric" or "imperial". The default is set to "metric".

output_units

Not a variable (column) in the provided dataframe or tibble. Specifies whether results will be given in metric (kilograms or megagrams per hectare) or imperial (US tons or US tons per acre) units. Must be set to either "metric" or "imperial". The default is set to "metric".

results

Not a variable (column) in the provided dataframe or tibble. Specifies whether the results will be summarized by tree, by plot, by plot as well as species, by plot as well as status (live/dead), or by plot as well as species and status. Must be set to either "by_tree", "by_plot", "by_species", "by_status", or "by_sp_st". The default is set to "by_plot".

Value

Depends on the results setting:

  • by_tree: a list with two components: (1) total run time for the function and (2) a dataframe with tree-level biomass and carbon estimates (reported in kilograms or US tons).

  • by_plot: a list with two components: (1) total run time for the function and (2) a dataframe with plot-level biomass and carbon estimates (reported in megagrams per hectare or US tons per acre).

  • by_species: a list with two components: (1) total run time for the function and (2) a dataframe with plot-level biomass and carbon estimates, further summarized by species (reported in megagrams per hectare or US tons per acre).

  • by_status: a list with two components: (1) total run time for the function and (2) a dataframe with plot-level biomass and carbon estimates, further summarized by status (live/dead; reported in megagrams per hectare or US tons per acre).

  • by_sp_st: a list with two components: (1) total run time for the function and (2) a dataframe with plot-level biomass and carbon estimates, further summarized by species as well as by status (reported in megagrams per hectare or US tons per acre).

Examples

BiomassNSVB(data = nsvb_demo,
            sp_codes = "4letter",
            input_units = "metric",
            output_units = "metric",
            results = "by_plot")

BiomassNSVB(data = nsvb_demo,
            sp_codes = "4letter",
            input_units = "metric",
            output_units = "metric",
            results = "by_status")

CoarseFuels

Description

Estimates coarse woody (1000-hour) fuel loads from line-intercept transects. See README for details.

Usage

CoarseFuels(
  tree_data,
  fuel_data,
  sp_codes = "4letter",
  units = "metric",
  summed = "no"
)

Arguments

tree_data

A dataframe or tibble with the following columns: time, site, plot, exp_factor, species, and dbh. Each row must be an observation of an individual tree.

fuel_data

A dataframe or tibble. If the summed parameter is set to "no" the following columns are required: time, site, plot, transect, length_1000h, diameter, and status. If the summed parameter is set to "yes" the following columns are required: time, site, plot, transect, length_1000h, ssd_R, and ssd_S.

sp_codes

Specifies whether the species column in tree_data follows the four-letter code or FIA naming convention. Must be set to either "4letter" or "fia." The default is set to "4letter".

units

Specifies whether the input data are in metric (centimeters, meters, and trees per hectare) or imperial (inches, feet, and trees per acre) units. Inputs must be all metric or all imperial (do not mix-and-match units). The output units will match the input units (i.e., if inputs are in metric then outputs will be in metric). Must be set to either “metric” or “imperial”. The default is set to “metric”.

summed

Specifies whether the sum-of-squared-diameters for sound and rotten 1000-hour fuels has already been calculated by the user. Must be set to either "yes" or "no". The default is set to "no".

Value

A dataframe with the following columns:

  • time: as described above

  • site: as described above

  • plot: as described above

  • load_1000s_Mg_ha (or load_1000s_ton_ac): fuel load of sound 1000-hour fuels in megagrams per hectare (or US tons per acre)

  • load_1000r_Mg_ha (or load_1000r_ton_ac): fuel load of rotten 1000-hour fuels in megagrams per hectare (or US tons per acre)

  • load_cwd_Mg_ha (or load_cwd_ton_ac): total coarse woody debris fuel load (1000-hour sound + 1000-hour rotten) in megagrams per hectare (or US tons per acre)

  • sc_length_1000s: slope-corrected transect length (i.e., horizontal transect length) for sound 1000-hour fuels in either meters or feet. This is the total horizontal length of transect sampled for sound 1000-hour fuels at the specific time:site:plot.

  • sc_length_1000r: slope-corrected transect length (i.e., horizontal transect length) for rotten 1000-hour fuels in either meters or feet. This is the total horizontal length of transect sampled for rotten 1000-hour fuels at the specific time:site:plot.

Examples

CoarseFuels(tree_data = overstory_demo,
            fuel_data = cwd_YS_demo,
            sp_codes = "4letter",
            units = "metric",
            summed = "yes")

CoarseFuels(tree_data = overstory_demo,
            fuel_data = cwd_NS_demo)

Coarse woody debris data for compilation demonstrations

Description

A fake dataset created for coarse woody debris compilation demonstration purposes only.

Usage

compilation_cwd_demo

Format

A dataframe with 9 rows and 9 columns:

time

year in which the data were collected

site

broader location or forest where the data were collected

stratum

stratum within site

plot

plot within stratum

load_1000s_Mg_ha

fuel load of sound 1000-hour fuels in megagrams per hectare

load_1000r_Mg_ha

fuel load of rotten 1000-hour fuels in megagrams per hectare

load_cwd_Mg_ha

total coarse woody debris fuel load in megagrams per hectare

sc_length_1000s

slope-corrected transect length for sound 1000-hour fuels in meters

sc_length_1000r

slope-corrected transect length for rotten 1000-hour fuels in meters

Source

Created by Kea Rutherford for demonstration purposes.


Data for general Fire and Fire Surrogate demonstrations

Description

A fake dataset created for general compilation demonstration purposes only.

Usage

compilation_ffs_demo

Format

A dataframe with 9 rows and 8 columns:

time

year in which the data were collected

trt_type

treatment type (burn, thin, thin + burn, control)

site

compartment

plot

plot within compartment

sph

stems per hectare

ba_m2_ha

basal area in meters squared per hectare

qmd_cm

quadratic mean diameter in centimeters

dbh_cm

average diameter at breast height in centimeters

Source

Created by Kea Rutherford for demonstration purposes.


FPC data for general simple random sampling demonstrations

Description

A fake dataset created for general compilation demonstration purposes only.

Usage

compilation_fpc_demo

Format

A dataframe with 2 rows and 3 columns:

site

broader location or forest where the data were collected

N

number of possible plots for the site

n

number of plots measured

Source

Created by Kea Rutherford for demonstration purposes.


Fine woody debris data for compilation demonstrations

Description

A fake dataset created for fine woody debris compilation demonstration purposes only.

Usage

compilation_fwd_demo

Format

A dataframe with 9 rows and 11 columns:

time

year in which the data were collected

site

broader location or forest where the data were collected

stratum

stratum within site

plot

plot within stratum

load_1h_Mg_ha

fuel load of 1-hour fuels in megagrams per hectare

load_10h_Mg_ha

fuel load of 10-hour fuels in megagrams per hectare

load_100h_Mg_ha

fuel load of 100-hour fuels in megagrams per hectare

load_fwd_Mg_ha

total fine woody debris fuel load in megagrams per hectare

sc_length_1h

slope-corrected transect length for 1-hour fuels in meters

sc_length_10h

slope-corrected transect length for 10-hour fuels in meters

sc_length_100h

slope-corrected transect length for 100-hour fuels in meters

Source

Created by Kea Rutherford for demonstration purposes.


Data for general simple random sampling demonstrations

Description

A fake dataset created for general compilation demonstration purposes only.

Usage

compilation_srs_demo

Format

A dataframe with 9 rows and 7 columns:

time

year in which the data were collected

site

broader location or forest where the data were collected

plot

plot within site

sph

stems per hectare

ba_m2_ha

basal area in meters squared per hectare

qmd_cm

quadratic mean diameter in centimeters

dbh_cm

average diameter at breast height in centimeters

Source

Created by Kea Rutherford for demonstration purposes.


Data for general simple random sampling demonstrations

Description

A fake dataset created for general compilation demonstration purposes only.

Usage

compilation_srs_sp_demo

Format

A dataframe with 8 rows and 8 columns:

time

year in which the data were collected

site

broader location or forest where the data were collected

plot

plot within site

species

tree species

dominance

relative basal area in percent

Source

Created by Kea Rutherford for demonstration purposes.


Data for general stratified random sampling demonstrations

Description

A fake dataset created for general compilation demonstration purposes only.

Usage

compilation_strs_demo

Format

A dataframe with 9 rows and 8 columns:

time

year in which the data were collected

site

broader location or forest where the data were collected

stratum

stratum within site

plot

plot within stratum

sph

stems per hectare

ba_m2_ha

basal area in meters squared per hectare

qmd_cm

quadratic mean diameter in centimeters

dbh_cm

average diameter at breast height in centimeters

Source

Created by Kea Rutherford for demonstration purposes.


Weight data for stratified random sampling demonstrations

Description

A fake dataset created for general compilation demonstration purposes only.

Usage

compilation_wt_demo

Format

A dataframe with 4 rows and 3 columns:

site

broader location or forest where the data were collected

stratum

stratum within site

wh

stratum weight

Source

Created by Kea Rutherford for demonstration purposes.


CompilePlots

Description

Compiles data beyond the plot level. Recognizes simple random sampling and stratified random sampling designs. Also recognizes the design of the Fire and Fire Surrogate. See README for details.

Usage

CompilePlots(data, design, wt_data = "not_needed", fpc_data = "not_needed")

Arguments

data

A dataframe or tibble. Data must already be summarized to the plot-level. Required columns depend on the sampling design:

  • Simple random sampling: must have time, site, and plot columns. A species column is optional. Other columns can be any numerical variables of interest (any column names, any number of variables).

  • Stratified random sampling: must have time, site, stratum, and plot columns. A species column is optional. Other columns can be any numerical variables of interest (any column names, any number of variables).

  • Fire and Fire Surrogate: must have time, trt_type, site, and plot columns. A species column is optional. Other columns can be any numerical variables of interest (any column names, any number of variables).

design

Specifies the sampling design. Must be set to "SRS" (simple random sample), "STRS" (stratified random sample), or "FFS" (Fire and Fire Surrogate). There is no default.

wt_data

Only required for stratified random sampling designs. A dataframe or tibble with the following columns: time (optional), site, stratum, and wh (stratum weight). The default is set to "not_needed", and should be left as such for design = "SRS" or design = "FFS".

fpc_data

An optional dataframe or tibble. Incorporates the finite population correction factor (FPC) when samples were taken without replacement. The default is set to "not_needed". Required columns depend on the sampling design:

  • Simple random sampling: must have site, N, and n columns. A time column is optional.

  • Stratified random sampling: must have site, stratum, N, and n columns. A time column is optional.

  • Fire and Fire Surrogate: must have trt_type, site, N and n columns. A time column in optional.

Value

Depends on the sampling design:

  • Simple random sampling: a dataframe with site-level summaries.

  • Stratified random sampling: a list with two components: (1) a dataframe with stratum-level summaries and (2) a dataframe with site-level summaries.

  • Fire and Fire Surrogate: a list with two components: (1) a dataframe with site-level (i.e., compartment-level) summaries and (2) a dataframe with treatment-level summaries.

Examples

CompilePlots(data = compilation_srs_demo,
             design = "SRS",
             wt_data = "not_needed",
             fpc_data = "not_needed")

CompilePlots(data = compilation_strs_demo,
             design = "STRS",
             wt_data = compilation_wt_demo,
             fpc_data = "not_needed")

CompileSurfaceFuels

Description

Compiles surface fuel data beyond the plot level. Specifically designed to further summarize outputs from the FineFuels and/or CoarseFuels functions. Recognizes simple random sampling and stratified random sampling designs. Also recognizes the design of the Fire and Fire Surrogate. See README for details.

Usage

CompileSurfaceFuels(
  fwd_data = "none",
  cwd_data = "none",
  design,
  wt_data = "not_needed",
  fpc_data = "not_needed",
  units = "metric"
)

Arguments

fwd_data

A dataframe or tibble. Fine woody debris (FWD) loads must already be calculated at the plot-level using the FineFuels function. Required columns depend on the sampling design:

  • Simple random sampling: must have time, site, plot, sc_length_1h, sc_length_10h, and sc_length_100h columns. Must also have load_1h_Mg_ha, load_10h_Mg_ha, and load_100h_Mg_ha (OR load_1h_ton_ac, load_10h_ton_ac, and load_100h_ton_ac).

  • Stratified random sampling: must have time, site, stratum, plot, sc_length_1h, sc_length_10h, and sc_length_100h columns. Must also have load_1h_Mg_ha, load_10h_Mg_ha, and load_100h_Mg_ha (OR load_1h_ton_ac, load_10h_ton_ac, and load_100h_ton_ac).

  • Fire and Fire Surrogate: must have time, trt_type, site, plot, sc_length_1h, sc_length_10h, and sc_length_100h columns. Must also have load_1h_Mg_ha, load_10h_Mg_ha, and load_100h_Mg_ha (OR load_1h_ton_ac, load_10h_ton_ac, and load_100h_ton_ac).

cwd_data

A dataframe or tibble. Coarse woody debris (CWD) loads must already be calculated at the plot-level using the CoarseFuels function. Required columns depend on the sampling design:

  • Simple random sampling: must have time, site, plot, sc_length_1000s, and sc_length_1000r columns. Must also have load_1000s_Mg_ha, load_1000r_Mg_ha, and load_cwd_Mg_ha (OR load_1000s_Mg_ha, load_1000r_Mg_ha, and load_cwd_Mg_ha).

  • Stratified random sampling: must have time, site, stratum, plot, sc_length_1000s, and sc_length_1000r columns. Must also have load_1000s_Mg_ha, load_1000r_Mg_ha, and load_cwd_Mg_ha (OR load_1000s_Mg_ha, load_1000r_Mg_ha, and load_cwd_Mg_ha).

  • Fire and Fire Surrogate: must have time, trt_type, site, plot, sc_length_1000s, and sc_length_1000r columns. Must also have load_1000s_Mg_ha, load_1000r_Mg_ha, and load_cwd_Mg_ha (OR load_1000s_Mg_ha, load_1000r_Mg_ha, and load_cwd_Mg_ha).

design

Specifies the sampling design. Must be set to "SRS" (simple random sample), "STRS" (stratified ransom sample), or "FFS" (Fire and Fire Surrogate). There is no default.

wt_data

Only required for stratified random sampling designs. A dataframe or tibble with the following columns: time (optional), site, stratum, and wh (stratum weight). The default is set to "not_needed", and should be left as such for design = "SRS" or design = "FFS".

fpc_data

An optional dataframe or tibble. Incorporates the finite population correction factor (FPC) when samples were taken without replacement. The default is set to "not_needed". Required columns depend on the sampling design:

  • Simple random sampling: must have site, N, and n columns. A time column is optional.

  • Stratified random sampling: must have site, stratum, N, and n columns. A time column is optional.

  • Fire and Fire Surrogate: must have trt_type, site, N and n columns. A time column in optional.

units

Specifies whether the input data are in metric (megagrams per hectare) or imperial (US tons per acre) units. Inputs must be all metric or all imperial (do not mix-and-match units). The output units will match the input units (i.e., if inputs are in metric then outputs will be in metric). Must be set to either “metric” or “imperial”. The default is set to “metric”.

Value

Depends on the sampling design:

  • Simple random sampling: a dataframe with site-level summaries.

  • Stratified random sampling: a list with two components: (1) a dataframe with stratum-level summaries and (2) a dataframe with site-level summaries.

  • Fire and Fire Surrogate: a list with two components: (1) a dataframe with site-level (i.e., compartment-level) summaries and (2) a dataframe with treatment-level summaries.

Examples

CompileSurfaceFuels(fwd_data = compilation_fwd_demo,
                    cwd_data = compilation_cwd_demo,
                    design = "STRS",
                    wt_data = compilation_wt_demo,
                    fpc_data = "not_needed",
                    units = "metric")

CompileSurfaceFuels(fwd_data = compilation_fwd_demo,
                    cwd_data = "none",
                    design = "STRS",
                    wt_data = compilation_wt_demo,
                    fpc_data = "not_needed",
                    units = "metric")

Data for coarse woody debris demonstrations

Description

A fake dataset created for coarse surface fuel demonstration purposes only. Sum-of-squared-diameters for sound and rotten 1000-hour fuels NOT already calculated.

Usage

cwd_NS_demo

Format

A dataframe with 16 rows and 8 columns:

time

Year in which the data were collected

site

Broader location or forest where the data were collected

plot

Plot in which the individual transect was measured

transect

Transect on which the 1000-hour fuel measurements were taken

length_1000h

Length of the sampling transect for 1000-hour fuels in meters

slope

Slope along the transect in percent

diameter

Diameter of 1000-hour fuel in centimeters

status

Rotten (R) or sound (S)

Source

Created by Kea Rutherford for demonstration purposes


Data for coarse woody debris demonstrations

Description

A fake dataset created for coarse surface fuel demonstration purposes only. Sum-of-squared-diameters for sound and rotten 1000-hour fuels already calculated.

Usage

cwd_YS_demo

Format

A dataframe with 12 rows and 8 columns:

time

Year in which the data were collected

site

Broader location or forest where the data were collected

plot

Plot in which the individual transect was measured

transect

Transect on which the 1000-hour fuel measurements were taken

length_1000h

Length of the sampling transect for 1000-hour fuels in meters

slope

Slope along the transect in percent

ssd_S

Sum-of-squared-diameters for sound 1000-hour fuels

ssd_R

Sum-of-squared-diameters for rotten 1000-hour fuels

Source

Created by Kea Rutherford for demonstration purposes.


FineFuels

Description

Estimates fine woody (1-hour, 10-hour, and 100-hour) fuel loads from line-intercept transects. See README for details.

Usage

FineFuels(fuel_data, tree_data, sp_codes = "4letter", units = "metric")

Arguments

fuel_data

A dataframe or tibble with the following columns: time, site, plot, transect, count_1h, count_10h, count_100h, length_1h, length_10h, and length_100h. A slope column is optional. Each row must be an observation of an individual transect at a specific time/site/plot.

tree_data

A dataframe or tibble with the following columns: time, site, plot, exp_factor, species, and dbh. Each row must be an observation of an individual tree.

sp_codes

Specifies whether the species column in tree_data follows the four-letter code or FIA naming convention. Must be set to either "4letter" or "fia." The default is set to "4letter".

units

Specifies whether the input data are in metric (centimeters, meters, and trees per hectare) or imperial (inches, feet, and trees per acre) units. Inputs must be all metric or all imperial (do not mix-and-match units). The output units will match the input units (i.e., if inputs are in metric then outputs will be in metric). Must be set to either “metric” or “imperial”. The default is set to “metric”.

Value

A dataframe with the following columns:

  • time: as described above

  • site: as described above

  • plot: as described above

  • load_1h_Mg_ha (or load_1h_ton_ac): fuel load of 1-hour fuels in megagrams per hectare (or US tons per acre)

  • load_10h_Mg_ha (or load_10h_ton_ac): fuel load of 10-hour fuels in megagrams per hectare (or US tons per acre)

  • load_100h_Mg_ha (or load_100h_ton_ac): fuel load of 100-hour fuels in megagrams per hectare (or US tons per acre)

  • load_fwd_Mg_ha (or load_fwd_ton_ac): total fine woody debris fuel load (1-hour + 10-hour + 100-hour) in megagrams per hectare (or US tons per acre)

  • sc_length_1h: slope-corrected transect length (i.e., horizontal transect length) for 1-hour fuels in either meters or feet. This is the total horizontal length of transect sampled for 1-hour fuels at the specific time:site:plot.

  • sc_length_10h: slope-corrected transect length (i.e., horizontal transect length) for 10-hour fuels in either meters or feet. This is the total horizontal length of transect sampled for 10-hour fuels at the specific time:site:plot.

  • sc_length_100h: slope-corrected transect length (i.e., horizontal transect length) for 100-hour fuels in either meters or feet. This is the total horizontal length of transect sampled for 100-hour fuels at the specific time:site:plot.

Examples

FineFuels(tree_data = overstory_demo,
          fuel_data = fwd_demo)

Data for forest composition and structure demonstrations

Description

A fake dataset created for composition and structure demonstration purposes only

Usage

for_demo_data

Format

A dataframe with 9 rows and 7 columns:

Forest

Broader location or forest where the data were collected

Plot_id

Plot in which the individual tree was measured

SPH

Stems per hectare

Live

Live (1) or dead (0)

SPP

Species of the individual tree, using four-letter species codes

DBH_CM

Diameter at breast height in centimeters

HT_M

Tree height in meters

Source

Created by Kea Rutherford for demonstration purposes


Data for forest composition and structure demonstrations

Description

A fake dataset created for composition and structure demonstration purposes only. Includes a plot without trees.

Usage

for_NT_demo

Format

A dataframe with 9 rows and 7 columns:

Forest

Broader location or forest where the data were collected

Plot_id

Plot in which the individual tree was measured

SPH

Stems per hectare

Live

Live (1) or dead (0)

SPP

Species of the individual tree, using four-letter species codes

DBH_CM

Diameter at breast height in centimeters

HT_M

Tree height in meters

Source

Created by Kea Rutherford for demonstration purposes.


ForestComp

Description

Compiles forest composition at the plot level. Measured as relative basal area or relative density for live trees.

Usage

ForestComp(
  data,
  site,
  plot,
  exp_factor,
  status,
  species,
  dbh,
  relative = "BA",
  units = "metric"
)

Arguments

data

A dataframe or tibble. Each row must be an observation of an individual tree.

site

Must be a character variable (column) in the provided dataframe or tibble. Describes the broader location or forest where the data were collected.

plot

Must be a character variable (column) in the provided dataframe or tibble. Identifies the plot in which the individual tree was measured.

exp_factor

Must be a numeric variable (column) in the provided dataframe or tibble. The expansion factor specifies the number of trees per hectare (or per acre) that a given plot tree represents.

status

Must be a character variable (column) in the provided dataframe or tibble. Specifies whether the individual tree is alive (1) or dead (0).

species

Must be a character variable (column) in the provided dataframe or tibble. Specifies the species of the individual tree.

dbh

Must be a numeric variable (column) in the provided dataframe or tibble. Provides the diameter at breast height (DBH) of the individual tree in either centimeters or inches.

relative

Not a variable (column) in the provided dataframe or tibble. Specifies whether forest composition should be measured as relative basal area or relative density. Must be set to either "BA" or "density". The default is set to "BA".

units

Not a variable (column) in the provided dataframe or tibble. Specifies whether the dbh variable was measured using metric (centimeters) or imperial (inches) units. Must be set to either "metric" or "imperial". The default is set to "metric".

Value

A dataframe with the following columns:

  • site: as described above

  • plot: as described above

  • species: as described above

  • dominance: relative basal area (or relative density) in percent (%)

Examples

ForestComp(data = for_demo_data,
           site = "Forest",
           plot = "Plot_id",
           exp_factor = "SPH",
           status = "Live",
           species = "SPP",
           dbh = "DBH_CM",
           relative = "BA",
           units = "metric")

ForestStr

Description

Compiles forest structure at the plot level.

Usage

ForestStr(data, site, plot, exp_factor, dbh, ht = "ignore", units = "metric")

Arguments

data

A dataframe or tibble. Each row must be an observation of an individual tree.

site

Must be a character variable (column) in the provided dataframe or tibble. Describes the broader location or forest where the data were collected.

plot

Must be a character variable (column) in the provided dataframe or tibble. Identifies the plot in which the individual tree was measured.

exp_factor

Must be a numeric variable (column) in the provided dataframe or tibble. The expansion factor specifies the number of trees per hectare (or per acre) that a given plot tree represents.

dbh

Must be a numeric variable (column) in the provided dataframe or tibble. Provides the diameter at breast height (DBH) of the individual tree in either centimeters or inches.

ht

Default is set to "ignore", which indicates that tree heights were not taken. If heights were taken, it can be set to a numeric variable (column) in the provided dataframe or tibble, providing the height of the individual tree in either meters or feet.

units

Not a variable (column) in the provided dataframe or tibble. Specifies (1) whether the dbh and ht variables were measured using metric (centimeters and meters) or imperial (inches and feet) units; (2) whether the expansion factor is in metric (stems per hectare) or imperial (stems per acre) units; and (3) whether results will be given in metric or imperial units. Must be set to either "metric" or "imperial". The default is set to "metric".

Value

A dataframe with the following columns:

  • site: as described above

  • plot: as described above

  • sph (or spa): stems per hectare (or stems per acre)

  • ba_m2_ha (or ba_ft2_ac): basal area in meters squared per hectare (or feet squared per acre).

  • qmd_cm (or qmd_in): quadratic mean diameter in centimeters (or inches). Weighted by the expansion factor.

  • dbh_cm (or dbh_in): average diameter at breast height in centimeters (or inches). Weighted by the expansion factor.

  • ht_m (or ht_ft): average height in meters (or feet) if ht argument was set. Weighted by the expansion factor.

Examples

ForestStr(data = for_demo_data,
          site = "Forest",
          plot = "Plot_id",
          exp_factor = "SPH",
          dbh = "DBH_CM",
          ht = "HT_M",
          units = "metric")

Data for fine woody debris demonstrations

Description

A fake dataset created for fine surface fuel demonstration purposes only

Usage

fwd_demo

Format

A dataframe with 12 rows and 11 columns:

time

Year in which the data were collected

site

Broader location or forest where the data were collected

plot

Plot in which the individual transect was measured

transect

Transect on which the fuel tallies were collected

count_1h

Count of 1-hour fuels

count_10h

Count of 10-hour fuels

count_100h

Count of 100-hour fuels

length_1h

Length of the sampling transect for 1-hour fuels in meters

length_10h

Length of the sampling transect for 10-hour fuels in meters

length_100h

Length of the sampling transect for 100-hour fuels in meters

slope

Slope along the transect in percent

Source

Created by Kea Rutherford for demonstration purposes


Data for duff and litter demonstrations

Description

A fake dataset created for duff and litter fuel demonstration purposes only. Depths already averaged together for each transect.

Usage

lit_duff_avg_demo

Format

A dataframe with 24 rows and 6 columns:

time

Year in which the data were collected

site

Broader location or forest where the data were collected

plot

Plot in which the individual transect was measured

transect

Transect on which the duff/litter depths were measured

litter_depth

Litter depth in centimeters

duff_depth

Duff depth in centimeters

Source

Created by Kea Rutherford for demonstration purposes.


Data for duff and litter demonstrations

Description

A fake dataset created for duff and litter fuel demonstration purposes only. Depths NOT already averaged together for each transect.

Usage

lit_duff_demo

Format

A dataframe with 24 rows and 6 columns:

time

Year in which the data were collected

site

Broader location or forest where the data were collected

plot

Plot in which the individual transect was measured

transect

Transect on which the duff/litter depths were measured

litter_depth

Litter depth in centimeters

duff_depth

Duff depth in centimeters

Source

Created by Kea Rutherford for demonstration purposes.


LitterDuff

Description

Estimates duff and litter fuel loads. See README for details.

Usage

LitterDuff(
  fuel_data,
  tree_data,
  sp_codes = "4letter",
  units = "metric",
  measurement = "separate"
)

Arguments

fuel_data

A dataframe or tibble. If the measurement parameter is set to "separate" the following columns are required: time, site, plot, transect, litter_depth, and duff_depth. If the measurement parameter is set to "combined" the following columns are required: time, site, plot, transect, and lit_duff_depth.

tree_data

A dataframe or tibble with the following columns: time, site, plot, exp_factor, species, and dbh. Each row must be an observation of an individual tree.

sp_codes

Specifies whether the species column in tree_data follows the four-letter code or FIA naming convention. Must be set to either “4letter” or “fia”. The default is set to “4letter”.

units

Specifies whether the input data are in metric (centimeters, meters, and trees per hectare) or imperial (inches, feet, and trees per acre) units. Inputs must be all metric or all imperial (do not mix-and-match units). The output units will match the input units (i.e., if inputs are in metric then outputs will be in metric). Must be set to either “metric” or “imperial”. The default is set to “metric”.

measurement

Specifies whether duff and litter were measured together or separately. Must be set to "combined" or "separate". The default is set to "separate".

Value

A dataframe with the following columns:

  • If measurement is set to "separate"

    • time: as described above

    • site: as described above

    • plot: as described above

    • litter_Mg_ha (or litter_ton_ac): litter load in megagrams per hectare (or US tons per acre)

    • duff_Mg_ha (or duff_ton_ac): duff load in megagrams per hectare (or US tons per acre)

  • If measurement is set to "combined"

    • time: as described above

    • site: as described above

    • plot: as described above

    • lit_duff_Mg_ha (or lit_duff_ton_ac): combined litter and duff load in megagrams per hectare (or US tons per acre)

Examples

LitterDuff(tree_data = overstory_demo,
           fuel_data = lit_duff_demo)

Data for NSVB framework biomass and carbon demonstrations

Description

A fake dataset created for NSVB framework biomass and carbon demonstration purposes only

Usage

nsvb_demo

Format

A dataframe with 16 rows and 14 columns:

division

Ecodivision in which the data were collected

province

Province in which the data were collected

site

Forest where the data were collected

plot

Plot in which the individual tree was measured

exp_factor

Stems per hectare

status

Live (1) or dead (0)

decay_class

1-5 for standing dead trees. NA for live trees.

Species

Species of the individual tree, using four-letter species codes

dbh

Diameter at breast height in centimeters

ht1

Tree height 1 in meters

ht2

Tree height 2 in meters

crown_ratio

Live crown ratio

top

Yes top (Y) or no top (N)

cull

Percent wood cull

Source

Created by Kea Rutherford for demonstration purposes


Overstory data for surface and ground fuel demonstrations

Description

A fake dataset created for surface and ground fuel demonstration purposes only

Usage

overstory_demo

Format

A dataframe with 14 rows and 6 columns:

time

Year in which the data were collected

site

Broader location or forest where the data were collected

plot

Plot in which the individual tree was measured

exp_factor

Stems per hectare

species

Species of the individual tree, using four-letter species codes

dbh

Diameter at breast height in centimeters

Source

Created by Kea Rutherford for demonstration purposes


SummaryBiomass

Description

Uses Forest Inventory and Analysis (FIA) Regional Biomass Equations to estimate above-ground stem, bark, and branch tree biomass. The package will summarize by plot or by plot as well as species. The package uses the California equation set and should not be used for data from other regions.

Usage

SummaryBiomass(
  data,
  site,
  plot,
  exp_factor,
  status,
  decay_class,
  species,
  dbh,
  ht,
  sp_codes = "4letter",
  units = "metric",
  results = "by_plot"
)

Arguments

data

A dataframe or tibble. Each row must be an observation of an individual tree.

site

Must be a character variable (column) in the provided dataframe or tibble. Describes the broader location or forest where the data were collected.

plot

Must be a character variable (column) in the provided dataframe or tibble. Identifies the plot in which the individual tree was measured.

exp_factor

Must be a numeric variable (column) in the provided dataframe or tibble. The expansion factor specifies the number of trees per hectare (or per acre) that a given plot tree represents.

status

Must be a character variable (column) in the provided dataframe or tibble. Specifies whether the individual tree is alive (1) or dead (0).

decay_class

Must be a character variable (column) in the provided dataframe or tibble. For standing dead trees, the decay class should be 1, 2, 3, 4, or 5 (see README file for more detail). For live trees, the decay class should be NA or 0.

species

Must be a character variable (column) in the provided dataframe or tibble. Specifies the species of the individual tree. Must follow four-letter species code or FIA naming conventions (see README file for more detail).

dbh

Must be a numeric variable (column) in the provided dataframe or tibble. Provides the diameter at breast height (DBH) of the individual tree in either centimeters or inches.

ht

Must be a numeric variable (column) in the provided dataframe or tibble. Provides the height of the individual tree in either meters or feet.

sp_codes

Not a variable (column) in the provided dataframe or tibble. Specifies whether the species variable follows the four-letter code or FIA naming convention (see README file for more detail). Must be set to either "4letter" or "fia". The default is set to "4letter".

units

Not a variable (column) in the provided dataframe or tibble. Specifies (1) whether the dbh and ht variables were measured using metric (centimeters and meters) or imperial (inches and feet) units; (2) whether the expansion factor is in metric (stems per hectare) or imperial (stems per acre) units; and (3) whether results will be given in metric (megagrams per hectare) or imperial (US tons per acre) units. Must be set to either "metric" or "imperial". The default is set to "metric".

results

Not a variable (column) in the provided dataframe or tibble. Specifies whether the results will be summarized by plot or by plot as well as species. Must be set to either "by_plot" or "by_species." The default is set to "by_plot".

Value

A dataframe with the following columns:

  • site: as described above

  • plot: as described above

  • species: if results argument was set to "by_species"

  • live_Mg_ha (or live_ton_ac): above-ground live tree biomass in megagrams per hectare (or US tons per acre)

  • dead_Mg_ha (or dead_ton_ac): above-ground dead tree biomass in megagrams per hectare (or US tons per acre)

Examples

SummaryBiomass(data = bio_demo_data,
               site = "Forest",
               plot = "Plot_id",
               exp_factor = "SPH",
               status = "Live",
               decay_class = "Decay",
               species = "SPP",
               dbh = "DBH_CM",
               ht = "HT_M",
               results = "by_species")

TreeBiomass

Description

Uses Forest Inventory and Analysis (FIA) Regional Biomass Equations to estimate above-ground stem, bark, and branch tree biomass. The package uses the California equation set and should not be used for data from other regions.

Usage

TreeBiomass(
  data,
  status,
  species,
  dbh,
  ht,
  decay_class = "ignore",
  sp_codes = "4letter",
  units = "metric"
)

Arguments

data

A dataframe or tibble. Each row must be an observation of an individual tree.

status

Must be a character variable (column) in the provided dataframe or tibble. Specifies whether the individual tree is alive (1) or dead (0).

species

Must be a character variable (column) in the provided dataframe or tibble. Specifies the species of the individual tree. Must follow four-letter species code or FIA naming conventions (see README file for more detail).

dbh

Must be a numeric variable (column) in the provided dataframe or tibble. Provides the diameter at breast height (DBH) of the individual tree in either centimeters or inches.

ht

Must be a numeric variable (column) in the provided dataframe or tibble. Provides the height of the individual tree in either meters or feet.

decay_class

Default is set to "ignore", indicating that biomass estimates for standing dead trees will not be adjusted for structural decay. It can be set to a character variable (column) in the provided dataframe or tibble. For standing dead trees, the decay class should be 1, 2, 3, 4, or 5 (see README file for more detail). For live trees, the decay class should be NA or 0.

sp_codes

Not a variable (column) in the provided dataframe or tibble. Specifies whether the species variable follows the four-letter code or FIA naming convention (see README file for more detail). Must be set to either "4letter" or "fia". The default is set to "4letter".

units

Not a variable (column) in the provided dataframe or tibble. Specifies whether the dbh and ht variables were measured using metric (centimeters and meters) or imperial (inches and feet) units. Also specifies whether the results will be given in metric (kilograms) or imperial (US tons) units. Must be set to either "metric" or "imperial". The default is set to "metric".

Value

The original dataframe, with four new columns. If decay_class is provided, the biomass estimates for standing dead trees will be adjusted for structural decay.

  • stem_bio_kg (or stem_bio_tons): biomass of stem in kilograms (or tons)

  • bark_bio_kg (or bark_bio_tons): biomass of bark in kilograms (or tons)

  • branch_bio_kg (or branch_bio_tons): biomass of branches in kilograms (or tons)

  • total_bio_kg (or total_bio_kg): biomass of tree (stem + bark + branches) in kilograms (or tons)

Examples

TreeBiomass(data = bio_demo_data,
            status = "Live",
            species = "SPP",
            dbh = "DBH_CM",
            ht = "HT_M",
            sp_codes = "4letter",
            units = "metric")

TreeBiomass(data = bio_demo_data,
            status = "Live",
            species = "SPP",
            dbh = "DBH_CM",
            ht = "HT_M",
            decay_class = "Decay",
            sp_codes = "4letter",
            units = "metric")

Fuel data for vignette, version 1

Description

A dataset with intentional errors for demonstration purposes

Usage

vign_fuels_1

Format

A dataframe with 236 rows and 16 columns:

time

pre (pre-burn) or post (post-burn)

site

compartment (60, 340, or 400)

plot

plot in which the individual transect was measured

transect

azimuth of transect on which the fuel data were collected

count_1h

count of 1-hour fuels

count_10h

count of 10-hour fuels

count_100h

count of 100-hour fuels

length_1h

length of the sampling transect for 1-hour fuels in meters

length_10h

length of the sampling transect for 10-hour fuels in meters

length_100h

length of the sampling transect for 100-hour fuels in meters

length_1000h

length of the sampling transect for 1000-hour fuels in meters

ssd_S

sum-of-squared-diameters for sound 1000-hour fuels

ssd_R

sum-of-squared-diameters for rotten 1000-hour fuels

litter_depth

litter depth in centimeters

duff_depth

duff depth in centimeters

slope

slope along the transect in percent

Source

Fire and Fire Surrogate Study, Stephens Lab, University of California, Berkeley


Fuel data for vignette, version 2

Description

A dataset with intentional errors for demonstration purposes

Usage

vign_fuels_2

Format

A dataframe with 236 rows and 16 columns:

time

pre (pre-burn) or post (post-burn)

site

compartment (60, 340, or 400)

plot

plot in which the individual transect was measured

transect

azimuth of transect on which the fuel data were collected

count_1h

count of 1-hour fuels

count_10h

count of 10-hour fuels

count_100h

count of 100-hour fuels

length_1h

length of the sampling transect for 1-hour fuels in meters

length_10h

length of the sampling transect for 10-hour fuels in meters

length_100h

length of the sampling transect for 100-hour fuels in meters

length_1000h

length of the sampling transect for 1000-hour fuels in meters

ssd_S

sum-of-squared-diameters for sound 1000-hour fuels

ssd_R

sum-of-squared-diameters for rotten 1000-hour fuels

litter_depth

litter depth in centimeters

duff_depth

duff depth in centimeters

slope

slope along the transect in percent

Source

Fire and Fire Surrogate Study, Stephens Lab, University of California, Berkeley


Fuel data for vignette, version 3

Description

A dataset with intentional errors for demonstration purposes

Usage

vign_fuels_3

Format

A dataframe with 236 rows and 16 columns:

time

pre (pre-burn) or post (post-burn)

site

compartment (60, 340, or 400)

plot

plot in which the individual transect was measured

transect

azimuth of transect on which the fuel data were collected

count_1h

count of 1-hour fuels

count_10h

count of 10-hour fuels

count_100h

count of 100-hour fuels

length_1h

length of the sampling transect for 1-hour fuels in meters

length_10h

length of the sampling transect for 10-hour fuels in meters

length_100h

length of the sampling transect for 100-hour fuels in meters

length_1000h

length of the sampling transect for 1000-hour fuels in meters

ssd_S

sum-of-squared-diameters for sound 1000-hour fuels

ssd_R

sum-of-squared-diameters for rotten 1000-hour fuels

litter_depth

litter depth in centimeters

duff_depth

duff depth in centimeters

slope

slope along the transect in percent

Source

Fire and Fire Surrogate Study, Stephens Lab, University of California, Berkeley


Fuel data for vignette, version 4

Description

A dataset with intentional errors and warnings for demonstration purposes

Usage

vign_fuels_4

Format

A dataframe with 236 rows and 16 columns:

time

pre (pre-burn) or post (post-burn)

site

compartment (60, 340, or 400)

plot

plot in which the individual transect was measured

transect

azimuth of transect on which the fuel data were collected

count_1h

count of 1-hour fuels

count_10h

count of 10-hour fuels

count_100h

count of 100-hour fuels

length_1h

length of the sampling transect for 1-hour fuels in meters

length_10h

length of the sampling transect for 10-hour fuels in meters

length_100h

length of the sampling transect for 100-hour fuels in meters

length_1000h

length of the sampling transect for 1000-hour fuels in meters

ssd_S

sum-of-squared-diameters for sound 1000-hour fuels

ssd_R

sum-of-squared-diameters for rotten 1000-hour fuels

litter_depth

litter depth in centimeters

duff_depth

duff depth in centimeters

slope

slope along the transect in percent

Source

Fire and Fire Surrogate Study, Stephens Lab, University of California, Berkeley


Fuel data for vignette, version 5

Description

A clean dataset for demonstration purposes

Usage

vign_fuels_5

Format

A dataframe with 236 rows and 16 columns:

time

pre (pre-burn) or post (post-burn)

site

compartment (60, 340, or 400)

plot

plot in which the individual transect was measured

transect

azimuth of transect on which the fuel data were collected

count_1h

count of 1-hour fuels

count_10h

count of 10-hour fuels

count_100h

count of 100-hour fuels

length_1h

length of the sampling transect for 1-hour fuels in meters

length_10h

length of the sampling transect for 10-hour fuels in meters

length_100h

length of the sampling transect for 100-hour fuels in meters

length_1000h

length of the sampling transect for 1000-hour fuels in meters

ssd_S

sum-of-squared-diameters for sound 1000-hour fuels

ssd_R

sum-of-squared-diameters for rotten 1000-hour fuels

litter_depth

litter depth in centimeters

duff_depth

duff depth in centimeters

slope

slope along the transect in percent

Source

Fire and Fire Surrogate Study, Stephens Lab, University of California, Berkeley


Tree data for vignette, version 1

Description

A dataset with intentional errors for demonstration purposes

Usage

vign_trees_1

Format

A dataframe with 2250 rows and 10 columns:

id

time:site combined

time

pre (pre-burn) or post (post-burn)

site

compartment (60, 340, or 400)

plot

plot in which the individual tree was measured

exp_factor

stems per hectare

status

live (1) or dead (0)

decay

1-5 for standing dead trees. 0 for live trees.

species

Species of the individual tree, using four-letter species codes

dbh

diameter at breast height in centimeters

ht

tree height in meters

Source

Fire and Fire Surrogate Study, Stephens Lab, University of California, Berkeley


Tree data for vignette, version 2

Description

A dataset with intentional errors for demonstration purposes

Usage

vign_trees_2

Format

A dataframe with 2250 rows and 10 columns:

id

time:site combined

time

pre (pre-burn) or post (post-burn)

site

compartment (60, 340, or 400)

plot

plot in which the individual tree was measured

exp_factor

stems per hectare

status

live (1) or dead (0)

decay

1-5 for standing dead trees. 0 for live trees.

species

Species of the individual tree, using four-letter species codes

dbh

diameter at breast height in centimeters

ht

tree height in meters

Source

Fire and Fire Surrogate Study, Stephens Lab, University of California, Berkeley


Tree data for vignette, version 3

Description

A dataset with intentional warnings for demonstration purposes

Usage

vign_trees_3

Format

A dataframe with 2250 rows and 10 columns:

id

time:site combined

time

pre (pre-burn) or post (post-burn)

site

compartment (60, 340, or 400)

plot

plot in which the individual tree was measured

exp_factor

stems per hectare

status

live (1) or dead (0)

decay

1-5 for standing dead trees. 0 for live trees.

species

Species of the individual tree, using four-letter species codes

dbh

diameter at breast height in centimeters

ht

tree height in meters

Source

Fire and Fire Surrogate Study, Stephens Lab, University of California, Berkeley


Tree data for vignette, version 4

Description

A dataset with intentional warnings for demonstration purposes

Usage

vign_trees_4

Format

A dataframe with 2250 rows and 10 columns:

id

time:site combined

time

pre (pre-burn) or post (post-burn)

site

compartment (60, 340, or 400)

plot

plot in which the individual tree was measured

exp_factor

stems per hectare

status

live (1) or dead (0)

decay

1-5 for standing dead trees. 0 for live trees.

species

Species of the individual tree, using four-letter species codes

dbh

diameter at breast height in centimeters

ht

tree height in meters

Source

Fire and Fire Surrogate Study, Stephens Lab, University of California, Berkeley


Tree data for vignette, version 5

Description

A clean dataset for demonstration purposes

Usage

vign_trees_5

Format

A dataframe with 2250 rows and 10 columns:

id

time:site combined

time

pre (pre-burn) or post (post-burn)

site

compartment (60, 340, or 400)

plot

plot in which the individual tree was measured

exp_factor

stems per hectare

status

live (1) or dead (0)

decay

1-5 for standing dead trees. 0 for live trees.

species

Species of the individual tree, using four-letter species codes

dbh

diameter at breast height in centimeters

ht

tree height in meters

Source

Fire and Fire Surrogate Study, Stephens Lab, University of California, Berkeley