species_shares {ForestElementsR} | R Documentation |
species_shares
Description
Calculate tree species shares for a fe_stand
object. Different
methods and scopes are available.
Usage
species_shares(
x,
tree_filter = TRUE,
method = c("ba_wd", "ba", "n"),
include_ingrowth = TRUE
)
Arguments
x |
An |
tree_filter |
A |
method |
Character string defining the calculation method to be applied. Must be one of "ba_wd" (default), "ba", and "n" (see Details). |
include_ingrowth |
If |
Details
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
:
- Basal area shares, weighted with wood density (method "ba_wd"):
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 withfe_species_bavrn_state_short
. The latter is used if this species coding is directly provided or if the species coding isfe_species_bavrn_state
. The reason for that restriction is that wood densities are currently only provided for the two species codingsfe_species_tum_wwk_short
, andfe_species_bavrn_state_short
. The resulting shares, however, will always relate to the original coding.- Unweighted basal area shares (method "ba"):
Species shares are calculated as shares of the unweighted basal areas.
- Stem number shares (method "n"):
-
Species shares are calculated as stem number shares, i.e. tree size does not matter for that calculation.
Value
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.
Examples
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