Learn R Programming

cards (version 0.5.1)

rename_ard_columns: Rename ARD Columns

Description

This function combines a pair of group/group_level or variable/variable_level columns into a single column. The group_level or variable_level column is renamed according to the value of the group or variable column, respectively.

Usage

rename_ard_columns(
  x,
  columns = c(all_ard_groups(), all_ard_variables()),
  unlist = NULL
)

Value

data frame

Arguments

x

(data.frame)
a data frame

columns

(tidy-select)
Name of columns to coalesce together and rename.

unlist

(tidy-select)
Columns to unlist. Often useful when performing visual inspection of the results where the list-columns are more difficult to work with.

Examples

Run this code
ADSL |>
  ard_categorical(by = ARM, variables = AGEGR1) |>
  apply_fmt_fn() |>
  rename_ard_columns(unlist = c(stat, stat_fmt))

Run the code above in your browser using DataLab