View source: R/NVEL_volume.R View source: R/NVEL_biomass.R
NVEL_biomass | R Documentation |
Predict biomass using National Volume Estimator Library (NVEL)
NVEL_biomass()
dfTL |
tree list with a minimum of diamter and height columns |
bioeq |
(optional) use single equation for all trees |
bioeqNm |
(optional) column name in DFTL: provide region, forest, district for every tree in dfTL |
spcdNm |
(required) column name in DFTL: USFS species code |
dbhNm |
(required) column name in DFTL: dbh in inches |
htNm |
(required) column name in DFTL: height in feet |
clNm |
(optional) column name in DFTL: crown length in feet |
merchDbNm |
(optional) column name in DFTL: upper db miminum for saw (in) |
htPrd1Nm |
(optional) column name in DFTL: Height to the minimum top diameter inside bark for primary product (ft) |
htPrd2Nm |
(optional) column name in DFTL: Height to the minimum top diameter inside bark for secondary product (ft) |
dll_64 |
path to 64bit dll |
dll_32 |
path to 64bit dll |
load_dll |
T/F should dll be loaded (in case it is already loaded) |
dll_func_vol |
name of volume prediction function call in NVEL .dll |
dll_func_bioeq |
name of volume equation chooser function call in NVEL .dll |
nclus |
number of cores to use |
Predict biomass using National Volume Estimator Library (NVEL)
see: https://www.fs.fed.us/forestmanagement/products/measurement/volume/nvel/index.php
Revision History
1.0 | 5/19/2020 Implemented |
a data.frame reformatted to include all of the original columns, any missing columns for the NVEL .dll, 15 columns of predicted volumes, and an error column
Jacob Strunk <someone@somewhere.com>
#look up volume equations
library(RSForInvt)
NVEL_voleq(region = 2, forest = "01",district = "01", spcd=951)
NVEL_voleq(region = 2, forest = "01",district = "01", spcd=951)
NVEL_voleq(region = 2, forest = "01",district = "01", spcd=rep(c(951,201),2))
NVEL_voleq(dfTL=data.frame(region = 6, forest = "01",district = "01", spcd=rep(c(951,201),2)))
#grab list of species
if(!"dfSpp" %in% ls()){
library(RSQLite)
db0 = dbConnect(RSQLite::SQLite(), system.file("misc/NBEL/BiomassEqns.db", package="RSForInvt"))
dfSpp = dbGetQuery(db0, paste("select * from tblspp"))
dfCoeff = dbGetQuery(db0, paste("select * from BM_EQCoefs"))
dbDisconnect(db0)
}
#build a fake tree list
if("df_fake" %in% ls()){
set.seed=111
nfake=length(unique(dfCoeff$species_code))
df_fake = data.frame(
trid=1:(nfake)
,region = 6
,forest = "01"
,district = "01"
,dbh=10*abs(rnorm(nfake))
,ht=100*abs(rnorm(nfake))
,spcd = unique(dfCoeff$species_code)#' sample(c("a","b","c","d") , nfake , T)
)
}
#get volumes
NVEL_volume( dfTL = df_fake )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.