Skip to contents
patient_data = sim_data |>
  dplyr::filter(.data$Category == "Patient")
table = sim_subtype_and_stage_table
tab1 <- table_subtype_by_demographics(
  patient_data, 
  table,
  demographic_vars = "Sex",
  footnotes_as_letters = FALSE) |> 
  gtsummary::as_flex_table()
tab1
Table 1: test

Characteristic

Overall
N = 181

Type 1
N = 171

Type 2
N = 11

p-value

Sex, n (%)

1.0002

Female

9 (50%)

8 (47%)

1 (100%)

Male

9 (50%)

9 (53%)

0 (0%)

1n (column %)

2Group comparison was done by Fisher's exact test