Skip to contents

[Experimental]

Usage

prep_plot(
  dat,
  comparisons = NULL,
  competence_var = "kb",
  competence = NULL,
  states = NULL,
  state_var = "TR_BUNDESLAND",
  group_var = "group",
  grouping_vars = NULL,
  grouping_vars_groups = NULL,
  sig_niveau = 0.05,
  plot_mean = FALSE,
  parameter = "mean"
)

Arguments

dat

Input data.frame stemming from eatRep.

comparisons

Character vector for filtering specific comparisons. Defaults to NULL, in which case all comparisons will be prepared.

competence_var

Character string containing the column name in dat that contains the different competences. Defaults to "kb".

competence

Character string containing the competence that should be plotted.

states

Character vector of the states that should be plotted.

state_var

Character string containing the column name in dat that should be used to distinguish between groups that should be plotted seperatly. Normally, this should be the states ("Bundesländer"). Therfore, defaults to "TR_BUNDESLAND".

group_var

Character string containing the column name in dat that contains the different group memberships in one string. Defaults to "group".

grouping_vars

Character vector containing maximal two column names in dat that should be used to distinguish between subgroups. If two columns are provided, they will be merged internally into one.

grouping_vars_groups

Character vector containing the groups from grouping_var you want to plot. Defaults to NULL, in which case all groups are prepared.

sig_niveau

Numeric indicating the border, below which p-values will be considered significant. Defaults to 0.05.

plot_mean

Logical value indicating whether the mean of the subgroups should be plotted as well.

parameter

Character string of the parameter value that should be reported. Defaults to "mean".

Value

prep_plot() returns a list containing four data.frames prepared for plotting with different eatPlot functions. This includes the data.frames:

Details

Performs different data transformations, to bring the input data.frame into the correct formats for different kind of plots.

Examples

# tbd