benjaminrich / table1

79 stars 26 forks source link

Proportions of 'stratification' variables #113

Open samuelsaari opened 11 months ago

samuelsaari commented 11 months ago

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)..

benjaminrich commented 11 months ago

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

samuelsaari commented 11 months ago

Thank you.

samuelsaari commented 10 months ago

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?