How do I order the variables displayed in table for tbl_uvregression?
I would like to make a table in gtsummary with the variables listed in this order from top to bottom:
How do I sort the output of tbl_custom_summary by row sum?
library(tidyverse) library(gtsummary) data <- tibble( id = c(1,2,3,4,5), report = c(“A,B”,”A”,”B,C”,”A,B,C”,”A,B,C”)) %>% mutate(b_present = ifelse(str_detect(report, “B”), “Yes”, “No”)) n_patients <- nrow(data) # number of patients, not reports custom_percent <- function(data, …) { n <- nrow(data) pct <- round(100*n/n_patients, 1) dplyr::tibble(pt_n = n, pt_pct = pct) } data %>% separate_rows(report, sep = “,”) %>% group_by(b_present, report) […]
P-value in tbl_strata
I am working with a large data set, and in the following example, I would like to indent the numerical variables (Scores, Time, and Grade), bold the levels of color (“Blue”, “Green”, etc.), provide p-values with 3 digits, and bold those p-values < 0.5. Thanks!
How to get category with zero observations to appear in gtsummary table in R?
Anyone have thoughts on how to get the v1.fac
Green category to appear in the table, despite having 0 obs? I would like all 4 colors to appear. Here’s my latest attempt:
Formatting gtsummary table layout to show subcategories on first column
I am struggling to modify formatting of gtsummary table to allow presentation of results for each category (species) by their region (both in first column) across seasons (columns)
Categorical variables instead of columns needs to be rows using gtsummary
Summary statistics in a paper
Pass function to the label argument in gtsummary
I often find myself changing the labels of a gtsummary object post function:
How to correctly add_overall and add_ci for continuos varibales in tbl_summary?
Hy everyone, i need to make a table with add_overall and add_ci.
R gtsummary tbl_summary with strata and two independent grouping variables
I’m trying to create a tbl_summary
that has a strata category, and within each strata category, two seperate categorical (likely binary) variables. Here’s an example of how I want the table to be laid out, however, the n/% for d
are placeholders and not true to my example dataset.
gt_summary: change statistics argument so, that dichotomous variables show number of both manifestations separated by slash ( / )
I need to prepare a clinical characteristics table showing not just the frequency of one manifestation of a dichotomous variable, but both on the same line seperated by a / (slash).