ggupset icon indicating copy to clipboard operation
ggupset copied to clipboard

Feature request: scale_x_upset order_by weighted frequency

Open mdhall272 opened this issue 3 years ago • 1 comments

I've been using ggupset for datasets where each datapoint has a weight, but when you set the weight aesthetic in geom_bar, the order generated by scale_x_upset(order_by = "freq") is still the order of the unweighted data. It would be nice to have the option of sorting by weighted total.

Thanks for the great package!

mdhall272 avatar Feb 08 '21 16:02 mdhall272

That's interesting, I didn't even know that geom_bar() had a weightaesthetics. However, I currently don't have the bandwith to implement this myself. But I am happy to accept a PR.

You would probably have to start here and see if there is an easy way to check if the weight aesthetics has been set.

const-ae avatar Feb 08 '21 16:02 const-ae