Home > OS >  Supress table header in tbl_regression of gt_summary
Supress table header in tbl_regression of gt_summary

Time:12-20

Update to clarify and show intention:

The related question is here enter image description here

y[[2]]

enter image description here

and so on.....

Now: I want to remove each footnote and header and merge them in a defined order together. In essence it is the reversal of spliting?!

Thanks for your time and energy!

First question:

With the tbl_regression() function from gt_summarywe can make a table.

By adding modify_footnote(everything() ~ NA, abbreviation = TRUE) we can omit footnotes.

like here: from:enter image description here

My question:

How can I remove the header part of this table to get this output:

enter image description here

If possible it should be possible with modify_header or modify_table_styling()?!

There is a rationale behind.

The ultimate goal is to split each element of a gt_summary table Split long gtsummary() table to n smaller tables and rearrange them in a given order tbl_merge: sort variables alphabetically in merged tbl_regression models {gtsummary}

CodePudding user response:

Once you've split your table, you can re-assemble it with tbl_stack(). No need to worry about the headers and footnotes...they will work themselves out. tbl_stack(list(y[[2)]], y[[1)]]).

CodePudding user response:

A simple approach using the huxtable backend:

ht <- as_hux_table(my_table)
ht <- ht[2,] # just row 2

# and to bind multiple huxtables together, do e.g.
rbind(ht, ht2, ht3)

After this you can edit the style appropriately using huxtable functions.

  • Related