https://rpubs.com/Amajid12/671096
Code used below:
Sm_Figure3 %>%
tbl_summary(
by = Figure.3,
statistic = all_continuous() ~ "{mean} ({sd})",
digits = all_continuous() ~ 2,
missing_text = "(Unknown)"
) %>%
add_p(pvalue_fun = ~style_pvalue(.x, digits = 4)) %>%
add_overall() %>%
add_n() %>%
modify_header(label ~ "Variable") %>%
modify_spanning_header(c("stat_1", "stat_2") ~ "Treatment Groups") %>%
bold_labels()
This is the error that occurs ^^
Not sure why this is omitting the P value, would love to hear some thoughts or work arounds to this