tidygraph icon indicating copy to clipboard operation
tidygraph copied to clipboard

top_n is broken, because min_rank is broken

Open perrystephenson opened this issue 8 years ago • 2 comments

Both of these functions work correctly when the final column is the one you want to rank on. However they don't work with the wt argument.

I've tried to have a look at the tidygraph code and figure out where it went wrong, but no luck.

I've been able to work around it by doing this:

filter(rank(desc(n), ties.method = "min") <= 50)

perrystephenson avatar Aug 19 '18 12:08 perrystephenson

Can I get you to provide a reproducible example illustrating this?

thomasp85 avatar Nov 20 '18 10:11 thomasp85

Ignore my previous (deleted) comment. It looks like this has been fixed, and I don't have access to the computer I was using when I raised this issue to double check the environment. It might have been fixed by something you did (although I can't see any commits that would have fixed this), a version mismatch with dplyr that has been resolved with a fresh install, or good old user error on my part.

perrystephenson avatar Dec 05 '18 06:12 perrystephenson