add_biomass: Add biomass.

Description Usage Arguments Value Examples

Description

Add biomass.

Usage

1
2
3
4
5
add_biomass(data, species, site, dbh_unit = guess_dbh_unit(data$dbh),
  biomass_unit = "kg")

add_component_biomass(data, species, site,
  dbh_unit = guess_dbh_unit(data$dbh), biomass_unit = "kg")

Arguments

data

A dataframe as those created with add_equations().

species

A ForestGEO-like species-dataframe.

site

The name of the site. One of allodb::sites_info$site.

dbh_unit

Character string giving the unit of dbh values, e.g. "mm" (see valid_units()).

biomass_unit

Character string giving the output unit e.g. "kg".

Value

A dataframe with a single row by each value of rowid.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
library(dplyr)

data <- fgeo.biomass::scbi_tree1 %>% slice(1:500)
species <- fgeo.biomass::scbi_species

add_biomass(data, species, site = "scbi")

# Otputs one row per biomass component
add_component_biomass(data, species, site = "scbi") %>%
  filter(rowid == "131") %>%
  select(rowid, treeID, stemID, dbh, matches("anatomic_relevance"), biomass)

# Sums biomass across components
add_biomass(data, species, site = "scbi") %>%
  filter(rowid == "131") %>%
  select(rowid, treeID, stemID, dbh, biomass)

forestgeo/fgeo.biomass documentation built on June 8, 2019, 10:47 p.m.