Skip to contents

Convert a SimtablR result or spec to a flextable

Usage

as_flextable.simtab_result(x, ...)

as_flextable.simtab_spec(x, ...)

as_flextable.simtab_report(x, ...)

Arguments

x

A simtab_result or simtab_spec.

...

Passed to the subclass flextable renderer.

Value

A flextable object, or a named list of flextable objects for a simtab_report.

Examples

if (requireNamespace("flextable", quietly = TRUE)) {
  res <- tb(epitabl, sex, diabetes)
  flextable::as_flextable(res)
}

Sex recorded for clinical assessment

No

Yes

Total

Female

517

169

686

Male

610

204

814

Total

1127

373

1500