Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optional arg to calculate proportions row-wise #73

Open
brentocarrigan opened this issue Sep 27, 2020 · 1 comment
Open

Optional arg to calculate proportions row-wise #73

brentocarrigan opened this issue Sep 27, 2020 · 1 comment

Comments

@brentocarrigan
Copy link

Fantastic package, many thanks!

Is there a way to incorporate a flag that calculates percentages row-wise, not column-wise? For example, in a cat table:


                     level  DrugA              DrugB               DrugC                  DrugD                
  n                         1021                 257                  81                   159                 
  age_cat (%)        <70    712 (69.7)           184 (71.6)           53 (65.4)            99 (62.3)           
                     >=70   309 (30.3)           73 (28.4)            28 (34.6)            60 (37.7)           

At times it can be helpful to compare row-wise - eg here the proportions/percentages of all patients <70 that were in each drug group; rather than the proportion within each drug group that were under 70.

@brentocarrigan
Copy link
Author

Additional comment: I see lots of TableOne code derives from the Deducer packer, some of their functions permit an argument to specify whether you wish for calculated frequencies to sum either row-wise prop.r or column-wise prop.c - this would be a huge help, or at least allow the dots ... to pass such arguments to the underlying Deducer functions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant