plyranges icon indicating copy to clipboard operation
plyranges copied to clipboard

`count` method for Ranges

Open sa-lee opened this issue 6 years ago • 1 comments

akin to https://dplyr.tidyverse.org/reference/tally.html

sa-lee avatar May 08 '18 05:05 sa-lee

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.

sa-lee avatar Aug 03 '18 18:08 sa-lee