table1 icon indicating copy to clipboard operation
table1 copied to clipboard

Proportions of 'stratification' variables

Open samuelsaari opened this issue 2 years ago • 3 comments

Is there a way of displaying (also) the percentages of rows by grouping variables? The default is to display total number of rows in a given group.

This hopefully makes it clearer: In the Vignette (https://cran.r-project.org/web/packages/table1/vignettes/table1-examples.html), it shows counts of 'status' table1(~ factor(sex) + age + factor(ulcer) + thickness | status, data=melanoma2). Would in addition like to see percentatages (65 %,28 %,7 %) in addition to the counts (134 57 14 205)..

samuelsaari avatar Oct 23 '23 06:10 samuelsaari

Please have a look at #92. It shows and example of how to do this.

benjaminrich avatar Nov 06 '23 18:11 benjaminrich

Thank you.

samuelsaari avatar Nov 07 '23 05:11 samuelsaari

Can you kindly have a look at #92 where I added a question relating to how to maintain the information when saving the table as a LaTeX file?

samuelsaari avatar Nov 13 '23 06:11 samuelsaari