n | R Documentation |
This function should only be used
within summarise()
, mutate()
and filter()
.
n()
n()
will only be evaluated inside a function call, where it
returns an integer.
ir <- as_iranges(
data.frame(start = 1:10,
width = 5,
name = c(rep("a", 5), rep("b", 3), rep("c", 2))
)
)
by_names <- group_by(ir, name)
summarise(by_names, n = n())
mutate(by_names, n = n())
filter(by_names, n() >= 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.