View source: R/verbs_grouping.R
| count | R Documentation |
Count observations by group
count(x, ..., wt = NULL, sort = FALSE, name = NULL)
tally(x, wt = NULL, sort = FALSE, name = NULL)
x |
A |
... |
Grouping columns (unquoted). |
wt |
Column to weight by (unquoted). If |
sort |
If |
name |
Name of the count column (default |
Equivalent to group_by(...) |> summarise(n = n()). When wt is
provided, uses sum(wt) instead of n(). When sort = TRUE, results
are sorted in descending order of the count column.
A vectra_node with group columns and a count column.
f <- tempfile(fileext = ".vtr")
write_vtr(mtcars, f)
tbl(f) |> count(cyl) |> collect()
unlink(f)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.