create_overviewbar_restab: Create restab for overview bars

create_overviewbar_restabR Documentation

Create restab for overview bars

Description

calculates scaled mean OR summed effect sizes per category, either (1) above- or belowground or (2) turnover or nestedness, as well as LUI and abiotic effects. The categories correspond to the categories given in the table 'nicenames' in columns'lui_ground' and 'lui_component'.

Usage

create_overviewbar_restab(
  restab,
  fun = c("mean", "sum"),
  yvar_name = "maxsplines"
)

Arguments

restab

exactly the output from the function 'create_restab0()'

fun

the function for aggregating. Is either "mean" or "sum".

yvar_name

character vector defining the column name of y values. Defaults to "maxsplines" as created in 'create_restab0'.

Details

*Note for developers* : This function was built from 'create_restab2()' and 'create_restab_3()' which were deleted (available in git history, date : 22.06.22, see commit 6f232cb from Aug 25, 2022 and commit from Jul 14, 2023 3dcec35)

**scaled mean** : calculating the mean, scaled effect. The mean contribution of a given group, represented as percentage of the total contribution of 100

**scaled sum** : calculates the summed effect, scaled to the total effect. There are more biotic than abiotic effects, but the biotic effect is "distilled" across more variables. Summing the effects shows which groups are driving the patterns dominantly.

Note : Here, the mean values for each component are calculated. Summing the mean scaled contribution of above + belowground **is not the same as** summing the mean scaled contribution of turnover + nestedness. The overviewbars do not show the same length of LUI and abiotic, because it's the relative contributions.

Value

a data.table containing values ready for plotting


allanecology/BetaDivMultifun documentation built on Nov. 9, 2023, 8:47 p.m.