atorus-research / Tplyr

Home Page:https://atorus-research.github.io/Tplyr/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Set multiple values (distinct_n, n) to set result order

johanneswerner opened this issue · comments

I am trying to set the order in a nested summary table. Ideally, I would like to sort first by number of subjects and second by number of events.

As far as I could see, set_result_order_var() only accepts one parameter. Is there a possibility to apply this sorting?

Thank you!

Hi @johanneswerner!

I think your best bet is this vignette: https://atorus-research.github.io/Tplyr/articles/post_processing.html#highly-customized-sort-variables. The sorting settings within the layer aren't quite flexible enough select a variety of different values to sort off of.