convertSI2SI: Site index conversion from one species to another species

View source: R/convertSI2SI.R

convertSI2SIR Documentation

Site index conversion from one species to another species

Description

This function takes a known species and its site index and convert the site index for the species for a given bec zone

Usage

convertSI2SI(
  spCode_to,
  BECZone = as.character(NA),
  BECSubZone = as.character(NA),
  availableSI
)

Arguments

spCode_to

character, The species code the site index conversion is for. This is not case sensitive.

BECZone

character, The BEC zone the conversion takes place.

BECSubZone

character, The sub BEC zone the conversion takes place.

availableSI

character, Contains available site index for given species. Must be provided like "at=10, bc=25".

Value

either valid site index or NA

Note

The site index conversion functions were taken from 1) sindex.dll (primarily), 2) expert knowledge of Gord Nigh and Dave Waddell The original functions were written by Dave Waddell, and can be found at https://github.com/bcgov/FAIB_PSPL/blob/main/05_site_index_conversions/site_index_conversion_equations_v3.r The function derives site index for target species based on priority orders of the available site index specifically, for at: sw>sx>se>bl>pl>fd ba: hw>ss>sx>cw>fd>bg(one_to_one)>bl(one_to_one) bl: sw>sx>pl>at>fd>lw>sb>ba(one_to_one)>bg(one_to_one) cw: hw>ba>ss>sx>fd>sw fd(coastal): hw>cw>ba>ss>sx fd(interior): pl>bl>hw>sw>sx>at>lw>sb hw(coastal): cw>ba>ss>sx>fd>hm(one_to_one) hw(interior):fd>sw>sx>pl>lw>hm(one_to_one) lw: fd>bl>pl>sw>sx>hw(interior)>sb>lt(one_to_one) pl: sw>sx>hw(interior)>at>bl>fd(interior)>lw>sb>ss(interior)>pa sb: pl>lw>fd(interior)>bl>sw>sx ss: hw(coastal)>ba>cw>fd(coastal)>sx(one_to_one)>pw(one_to_one)>fd(one_to_one) sw: pl>at>hw(interior)>bl>lw>fd(interior)>sb>se(one_to_one)>sx(one_to_one) sx(coastal): hw>ba>cw>fd sx: pl>at>hw(interior)>bl>lw>fd(interior)>sb>sw(one_to_one) se: sw(one_to_one) bg: ba pw: ss(coastal)>hw(coastal)>sw>fd(one_to_one) lt: lw(one_to_one) hm: hw pa: pl dr: fd(coastal)>hw(coastal) py: fd

Author(s)

Yong Luo

Examples

## Not run: 
# convert sw to at
at_si <- convertSI2SI(spCode_to = "AT",
                      BECZone = "unknown", # for some species, BEC zone must be provided
                      BECSubZone = "unknown",
                      availableSI = "sw = 30, pl = 50, fd = 20")
print(at_si) # 32.8353
# convert ta to fd in CWH, for which the conversion equation can not be found
py_si <- convertSI2SI(spCode_to = "py",
                              BECZone = "CWH", # for some species, BEC zone must be provided
                              BECSubZone = "unknown",
                              availableSI = "fd = 30")
print(py_si) # 30

## End(Not run)


bcgov/FAIBBase documentation built on June 19, 2024, 11:57 p.m.