plyranges
plyranges copied to clipboard
`count` method for Ranges
akin to https://dplyr.tidyverse.org/reference/tally.html
So dplyr::count
uses dplyr::tally
and are not generic, so in principle these should work out of the box as they are just combinations of summarise and group by. However, they don't work for the following reasons:
There are two methods these functions call groups
and tbl_vars
. tbl_vars
I haven't implemented but it could just use my range_vars
function. And with groups
I have not implemented it for ordinary Ranges!
The other problem is making sure we find the right n()
variant, since there's a conflict if plyranges isn't attached and the function will select dplyr::n and throw an error.