Learn R Programming

tfrmt (version 0.3.0)

update_group: Remap group values in a tfrmt

Description

Remap group values in a tfrmt

Usage

update_group(tfrmt, ...)

Value

A tfrmt with the group variables updated in all places

tfrmt object with updated groups#'

Arguments

tfrmt

a tfrmt

...

Use new_name = old_name to rename selected variables

Examples

Run this code

tfrmt_spec <- tfrmt(
    group = c(group1, group2),
    body_plan  = body_plan(
      frmt_structure(
         group_val = list(group2 = "value"),
         label_val = ".default",
         frmt("XXX")
         ),
     frmt_structure(
         group_val = list(group1 = "value", group2 = "value"),
         label_val = ".default",
         frmt("XXX")
       )
    ))

tfrmt_spec %>%
  update_group(New_Group = group1)

Run the code above in your browser using DataLab