Last chance! 50% off unlimited learning
Sale ends in
Calculate tree species shares for a fe_stand
object. Different
methods and scopes are available.
species_shares(
x,
tree_filter = TRUE,
method = c("ba_wd", "ba", "n"),
include_ingrowth = TRUE
)
A data frame (tibble) with the three columns species_id
,
time_yr
, and species_share
. If no tree passes the
user-defined tree_filter
, the tibble will have no lines.
An fe_stand
object
A data-masking
expression that applies to the
data.frame x$trees
. It must return a logical value, and is defined
in terms of the variables in x$trees
. In this function, it is used
internally in order to define the cohort of trees which is to be evaluated
by this function (within a call to dplyr::filter()
). While many
meaningful filterings are conceivable, distinctions between total stand,
removal stand, and remaining stand are the most probable applications.
Defaults to TRUE
, i.e. all trees are included. See examples.
Character string defining the calculation method to be applied. Must be one of "ba_wd" (default), "ba", and "n" (see Details).
If TRUE
(default), newly ingrown trees will be
included in the calculation.
The calculation uses the trees
data frame of the input
fe_stand
object. The small tree cohort is not taken into
account. Three different methods are available to choose from (parameter
method
:
The species shares are based on basal areas
which are weighted with the species specific wood densities raised to the
power of 2/3. The exponent of 2/3 takes into account that wood density is a
three-dimensional quantity, while basal area is two-dimensional. This is the
default method. It works, however, only with species codings that can be
converted into the fe_species_tum_wwk_short
coding (default),
or with fe_species_bavrn_state_short
. The latter is used if
this species coding is directly provided or if the species coding is
fe_species_bavrn_state
. The reason for that restriction is that
wood densities are currently only provided for the two species codings
fe_species_tum_wwk_short
, and
fe_species_bavrn_state_short
. The resulting shares, however,
will always relate to the original coding.
Species shares are calculated as shares of the unweighted basal areas.
Species shares are calculated as stem number shares, i.e. tree size does not matter for that calculation.
species_shares(selection_forest_1_fe_stand) # default method ("ba_wd")
species_shares(selection_forest_1_fe_stand, method = "ba")
species_shares(selection_forest_1_fe_stand, method = "n")
# Same stand, different cohorts
mm_forest_1_fe_stand_spatial |> species_shares() # all trees
mm_forest_1_fe_stand_spatial |> species_shares(!removal) # remaining only
mm_forest_1_fe_stand_spatial |> species_shares(removal) # removal only
Run the code above in your browser using DataLab