Skip to contents

Function needed to create a frmt_structure object, which is a building block of body_plan(). This specifies the rows the format will be applied to.

Usage

frmt_structure(group_val = ".default", label_val = ".default", ...)

Arguments

group_val

A string or a named list of strings which represent the value of group should be when the given frmt is implemented

label_val

A string which represent the value of label should be when the given frmt is implemented

...

either a frmt(), frmt_combine(), or a frmt_when() object. This can be named to also specify the parameter value

Value

frmt_structure object

Images

Here are some example outputs: Example comparing fmt, frmt_combine, and frmt_when

See also

body_plan() combines the frmt_structures to be applied to the table body, and frmt(), frmt_combine(), and frmt_when() define the format semantics.

Link to related article

Examples


sample_structure <- frmt_structure(
          group_val = c("group1"),
          label_val = ".default",
          frmt("XXX")
        )
## multiple group columns
sample_structure <- frmt_structure(
          group_val = list(grp_col1 = "group1", grp_col2 = "subgroup3"),
          label_val = ".default",
          frmt("XXX")
        )