new_equations: Modify the original equation table

Description Usage Arguments Value Examples

View source: R/new_equations.R

Description

This function modifies the original equation table to be used in other functions of the package including: subset the original equation table, add new equations, and choose whether to include equations with a height allometry.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
new_equations(
  subset_taxa = "all",
  subset_climate = "all",
  subset_region = "all",
  subset_ids = "all",
  subset_output = c("Total aboveground biomass", "Whole tree (above stump)"),
  new_taxa = NULL,
  new_allometry = NULL,
  new_coords = NULL,
  new_min_dbh = NULL,
  new_max_dbh = NULL,
  new_sample_size = NULL,
  new_unit_dbh = "cm",
  new_unit_output = "kg",
  new_input_var = "DBH",
  new_output_var = "Total aboveground biomass",
  use_height_allom = TRUE
)

Arguments

subset_taxa

character vector with taxa to be kept. Default is "all", in which case all taxa are kept.

subset_climate

character vector with Koppen climate classification to be kept. Default is "all", in which case all climates are kept.

subset_region

character vector with name of location(s) or country(ies) or broader region(s) (eg. "Europe", "North America") to be kept. Default is "all", in which case all regions/countries are kept.

subset_ids

character vector with equation IDs to be kept. Default is "all", in which case all equations are kept.

subset_output

What dependent variable(s) should be provided in the output? Default is "Total aboveground biomass" and "Whole tree (above stump)", other possible values are: "Bark biomass", "Branches (dead)", "Branches (live)", "Branches total (live, dead)", "Foliage total", "Height", "Leaves", "Stem (wood only)", "Stem biomass", "Stem biomass (with bark)", "Stem biomass (without bark)", "Whole tree (above and belowground)". Be aware that currently only a few equations represent those other variables, so estimated values might not be very accurate.

new_taxa

character string or vector specifying the taxon (or taxa) for which the allometry has been calibrated.

new_allometry

a character string with the allometric equation.

new_coords

a vector or matrix of coordinates (longitude, latitude) of the calibration data.

new_min_dbh

numerical value, minimum DBH for which the equation is valid (in cm). Default is NULL (nothing is added).

new_max_dbh

numerical value, maximum DBH for which the equation is valid (in cm). Default is NULL (nothing is added).

new_sample_size

number of measurements with which the allometry was calibrated. Default is NULL (nothing is added).

new_unit_dbh

character string with unit of DBH in the equation (either cm, mm or inch). Default is "cm".

new_unit_output

character string with unit of equation output (either "g", "kg", "Mg" or "lbs" if the output is a mass, or "m" if the output is a height).

new_input_var

independent variable(s) needed in the allometry. Default is "DBH", other option is "DBH, H".

new_output_var

dependent variable estimated by the allometry. Default is "Total aboveground biomass".

use_height_allom

a logical value. In allodb we use Bohn et al. (2014) for European sites. User need to provide height allometry when needed to calculate AGB. Default is TRUE.

Value

An object of class "data.frame" of new equations.

Examples

1
2
3
4
5
6
7
8
new_equations(
  new_taxa = "Faga",
  new_allometry = "exp(-2+log(dbh)*2.5)",
  new_coords = c(-0.07, 46.11),
  new_min_dbh = 5,
  new_max_dbh = 50,
  new_sample_size = 50
)

forestgeo/allodb documentation built on Oct. 25, 2021, 9:33 p.m.