Description Usage Arguments Value See Also Examples
Analogous function for summarise
in dplyr.
1 2 3 | summarise_dt(data, ..., by = NULL)
summarize_dt(data, ..., by = NULL)
|
data |
data.frame |
... |
List of variables or name-value pairs of summary/modifications functions. |
by |
unquoted name of grouping variable of list of unquoted names of grouping variables. For details see data.table |
data.table
1 2 3 4 5 6 | iris %>% summarise_dt(avg = mean(Sepal.Length))
iris %>% summarise_dt(avg = mean(Sepal.Length),by = Species)
mtcars %>% summarise_dt(avg = mean(hp),by = .(cyl,vs))
# the data.table way
mtcars %>% summarise_dt(cyl_n = .N, by = .(cyl, vs)) # `.`` is short for list
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.