View source: R/species_shares.R
species_shares | R Documentation |
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
)
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 |
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.
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.
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.