n: The number of observations in the current group.

Description Usage Examples

Description

This function is implemented specifically for each data source and can only be used from within summarise(), mutate() and filter().

Usage

1
n()

Examples

1
2
3
4
5
6
if (require("nycflights13")) {
carriers <- group_by(flights, carrier)
summarise(carriers, n())
mutate(carriers, n = n())
filter(carriers, n() < 100)
}

olascodgreat/samife documentation built on May 13, 2019, 6:11 p.m.