Roman Maksvytis
Roman Maksvytis

Reputation: 63

How to assign decimals to specific variables in gtsummary table?

I have to create summary table for several variables organized in wide format. Row data has two decimals and some of them 4 (log-transformed). When I pass digits = ~c(0, 2, 2, 2, 2, 2, 2, 2) for statistic = ~ c("{N_nonmiss}", "{mean}", "{GMean}", "{sd}", "{CV}", "{median}", "{min}", "{max}") I get two decimals for all variables, as expected.

How to adjust the code especially for ln variables to assign 4 digits for mean, sd etc?

The code I have working well with two decimals for all variables

enter image description here

Upvotes: 0

Views: 26

Answers (0)

Related Questions