count.dtplyr_step | 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(x, ..., wt = NULL, sort = FALSE, name = NULL)
x |
A |
... |
< |
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.