ProjectMOSAIC / mosaic

Project MOSAIC R package
http://mosaic-web.org/
93 stars 26 forks source link

both count and percents with "tally"? #799

Closed zawkzaw closed 9 months ago

zawkzaw commented 2 years ago

Hello Is there a way to call both count and percents with "tally" function?

Thanks

Ko Ko Zaw

rpruim commented 9 months ago

@zawkzaw , Some how I missed this when you submitted it. I think the answer to your question is "no", but you can try using df_stats() which has more options.

df_stats( ~ Species, data = iris, counts, percs, props)
  response n_setosa n_versicolor n_virginica perc_setosa perc_versicolor perc_virginica prop_setosa prop_versicolor
1  Species       50           50          50    33.33333        33.33333       33.33333   0.3333333       0.3333333
  prop_virginica
1      0.3333333