Hi,
I made two gt tables representing different cell types and corresponding p-values from different models. My supervisor asked me to remove the descriptive spanner labels and merge the two tables. My tables look like this:
table1
table2
I was asked to make this table:
I tried using the {datapasta} package to provide some data, but the Rdata objects are formatted as gt objects. Is there another way I can provide the data?
Secondly, I tried to add a group row label underneath Covariates, and received the following error:
gt_tbl <- table1 %>%
gt(rowname_col = "Covariates") %>%
tab_row_group(
label = "All cases (N = 333) versus controls (N = 396)",
rows = 2:3
)
gt_tbl
Error in tab_row_group(., label = "All cases (N = 333) versus controls (N = 396)", :
unused argument (label = "All cases (N = 333) versus controls (N = 396)")
Finally, I would like to merge the two tables. Can I call two different datasets when creating a gt table? I would love some guidance here.
Thank you!