Description Usage Arguments Value See Also Examples
Analogous function for count
and add_count
in dplyr.
1 2 3 |
data |
data.table/data.frame data.frame will be automatically converted to data.table. |
... |
variables to group by. |
sort |
logical. If TRUE result will be sorted in desending order by resulting variable. |
name |
character. Name of resulting variable. Default uses "n". |
data.table
1 2 3 4 | iris %>% count_dt(Species)
iris %>% count_dt(Species,name = "count")
iris %>% add_count_dt(Species)
iris %>% add_count_dt(Species,name = "N")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.