convertSI2SI | R Documentation |
This function takes a known species and its site index and convert the site index for the species for a given bec zone
convertSI2SI(
spCode_to,
BECZone = as.character(NA),
BECSubZone = as.character(NA),
availableSI
)
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 |
either valid site index or NA
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
Yong Luo
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.