Skip to contents

Generate a dataframe describing the steps and factor levels in the study workflow to assist in setting pretty labels for each step and factor level.

Usage

get_pretty_labels_template(participant_level_progress, parents, children)

Arguments

participant_level_progress

A detail dataframe describing the progress of each research participant

parents

A vector nodes of the diagram that have children

children

A vector enumerating the child categorical level below the corresponding parent

Value

A data frame with on row for each step in the study and one row for each factor level at each step. The data frame has these columns:

  • variable - the factor for this level

  • row_type - a character string indicating if this row describes a step of the factor values on that step

  • plain_label - the existing label derived from the step or its factor level

  • pretty_label - the pretty label to use in place of label

Examples

if (FALSE) { # \dontrun{
get_pretty_labels_template(
  participant_level_progress = progress_detail,
  parents = steps$parent,
  children = steps$child
)
} # }