Learn R Programming

furniture (version 1.11.0)

table1_flextable: flextable output for table1

Description

This takes a table1 object and outputs a `flextable` version.

Usage

table1_flextable(tab, spanner = NULL)

Arguments

tab

the table1 object

spanner

the label above the grouping variable (if table1 is grouped) or any label you want to include over the statistics column(s)

Examples

Run this code

library(furniture)
library(dplyr)

data('nhanes_2010')
nhanes_2010 %>%
  group_by(asthma) %>%
  table1(age, marijuana, illicit, rehab, na.rm = FALSE) %>%
  table1_flextable(spanner = "Asthma")

Run the code above in your browser using DataLab