WebAug 20, 2024 · I'm having trouble figuring out the correct gtsummary variable name to access the various column names. I currently have a workaround in which I first modify the categorical levels headers, and then add the overall and modify it. However, I'm wondering if there is a better way to do this in a single modify_header line. Reprex with various ... WebOct 21, 2024 · 1 Answer Sorted by: 3 This issue you're experiencing is that you're selecting all columns that begin with "stat_". But in a tbl_regression () table, there are no columns that begin with "stat_". Use the helper function show_header_names () to print the current column names along with their headers.
Add a table footnote — tab_footnote • gt - RStudio
WebJan 13, 2024 · When assigning column headers, footnotes, spanning headers, and captions for these gtsummary tables, you may use {N} to insert the number of observations. tbl_svysummary objects additionally have {N_unweighted} available. WebApr 15, 2024 · The {gtsummary} package has built-in functions for adding to results from tbl_regression (). The following functions add columns and/or information to the regression table. add_global_p () adds the global p-value for a categorical variables add_nevent () adds the number of observed events to the results object {gtsummary} functions to … joel schechet attorney asheville
Spanning header for gtsummary regression table - Stack Overflow
Weblibrary (gtsummary) library (dplyr, warn.conflicts = F) library (gt) trial %>% select (trt, stage, age, grade) %>% tbl_summary (by = trt) %>% add_p ( include = c (-age) #Can use any tidyselect helpers/select syntax to specify which p-vals ) %>% as_gt (include = -tab_footnote) %>% # if using gt, can exclude footnotes this way tab_footnote ( # and … WebI am using gtsummary for combining the variables in a table. library (gtsummary) tbl_n <- tbl_uvregression ( logistic_s [c ("N", "Age", "sex", "Age_1")], method = glm, y = N, method.args = list (family = binomial), exponentiate = TRUE ) tbl_n This produces the output for one group (eg. N) with the variables Age, Age_1, Sex. WebWe can add this part using the tab_header () function: # Make a display table with the `islands_tbl` # table; put a heading just above the column labels gt_tbl <- gt_tbl > tab_header ( title = "Large Landmasses of the … joels auction strawberry point iowa