# Three examples for single tree applications with species codes given
# as integers (but following the ger_nfi_2012 coding)
# European beech, dbh_cm < dq_cm
h_standard_gnfi3(species_id = 100, dbh_cm = 14.8, d_q_cm = 25, h_q_m = 22)
# Scots pine, dbh_cm == dq_cm
h_standard_gnfi3(species_id = 20, dbh_cm = 25, d_q_cm = 25, h_q_m = 22)
# Douglas fir, dbh_cm > dq_cm
h_standard_gnfi3(species_id = 40, dbh_cm = 45, d_q_cm = 25, h_q_m = 22)
# Same Douglas fir but species_id = 7 (i.e. tum_wwk_short),
# note the message, because numeric 7 is not convertible into ger_nfi_2012
h_standard_gnfi3(species_id = 7, dbh_cm = 45, d_q_cm = 25, h_q_m = 22)
# But no message, when species_id = 7 is made a tum_wwk_short object first,
# because this can be unambiguously converted into ger_nfi_2012
h_standard_gnfi3(
fe_species_tum_wwk_short(7), dbh_cm = 45, d_q_cm = 25, h_q_m = 22
)
# Usually, applications will be vectorized
species_id <- fe_species_ger_nfi_2012(rep(20, 7)) # Seven Scots pines
dbh <- c(10.1, 27.4, 31.4, 35.5, 39.8, 45.2, 47.2) # and their diameters
# Estimate the heights of these trees, assuming they are from a
# stand with a mean diameter of 35.5 cm, and a corresponding mean height
# of 28 m.
h_standard_gnfi3(species_id, dbh, d_q_cm = 35.5, h_q_m = 28.0)
# Compare with sister function h_standard_bv, assuming a stand age of
# 100 years
h_standard_bv(species_id, dbh, age_yr = 100, d_q_cm = 35.5, h_q_m = 28.0)
Run the code above in your browser using DataLab