Prepare lineplot data.
prep_tablebarplot.Rd
Prepare lineplot data.
Usage
prep_tablebarplot(
eatRep_dat,
subgroup_var = NULL,
names_from = c("year", "comparison", "parameter"),
par = "mean",
facet_var = "TR_BUNDESLAND",
total_facet = "total",
comparisons = NULL,
sig_niveau = 0.05
)
Arguments
- eatRep_dat
Object returned by
eatRep
.- subgroup_var
Character string of the column in
eatPlot_dat$group
oreatPlot_dat$plain
containing the subgroup mapping. Each supgroup will receive it's own line. IF there are subgroups within the data, this needs to be set, otherwise the data preparation might fail. Defaults toNULL
.- names_from
Character vector of the variables that should be used to create the wide format. Defaults to
c("year", "comparison", "parameter")
.- par
Character vector of the parameters that should be used for the data preperation. Defaults to
mean
.- facet_var
Character string of the variable containing information on groups some of the comparisons are made against. This is needed to decosntruct comparisons like
crossDiff
intocrossDiff
andcrossDiffTotal
(so a crossDiff comparison against the total group). Name might be a bit confusing, but is the same as inprep_lineplot
. Defaults toTR_BUNDESLAND
.- total_facet
Character string of the name of the total groups containing all other groups of the facet var. Defaults to
"total"
.- comparisons
Character string that can be used to filter the needed comparions. This can drastically reduce the output of the prepared data. Defaults to
c("none", "crossDiff", "trend", "trend_crossDiff")
.- sig_niveau
Numeric indicating the border below which p-values will be considered significant. Defaults to
0.05
.