count.dtplyr_step {dtplyr} | R Documentation |
This is a method for the dplyr count()
generic. It is translated using
.N
in the j
argument, and supplying groups to keyby
as appropriate.
## S3 method for class 'dtplyr_step' count(.data, ..., wt = NULL, sort = FALSE, name = NULL)
.data |
|
... |
< |
wt |
<
|
sort |
If |
name |
The name of the new column in the output. If omitted, it will default to |
library(dplyr, warn.conflicts = FALSE) dt <- lazy_dt(dplyr::starwars) dt %>% count(species) dt %>% count(species, sort = TRUE) dt %>% count(species, wt = mass, sort = TRUE)