GSK-Biostatistics/tfrmt

frmt_combine errors if group variable is named "var"

Closed this issue · 0 comments

reprex:

mytfrmt <- tfrmt(
  group = "var",
  label = "lbl",
  param = "prm",
  value = "val",
  column = "col",
  body_plan = body_plan(
    frmt_structure(group_val = ".default", label_val = ".default", 
                   frmt_combine("{n} ({pct}%)",
                                n = frmt("xx"),
                                pct = frmt("xx.x")))
  )
)
print_mock_gt(mytfrmt)

results in error:

Error in `map()`:
ℹ In index: 1.
Caused by error in `apply_frmt.frmt_combine()`:
! Unable to create formatting combination because the following parameters are missing from the data:
 n 
pct