n

0th

Percentile

The number of observations in the current group.

This function is implemented special for each data source and can only be used from within summarise.

Usage
n()
Aliases
  • n
Examples
if (require("hflights")) {
carriers <- group_by(hflights, UniqueCarrier)
summarise(carriers, n())
}
Documentation reproduced from package dplyr, version 0.1.1, License: MIT + file LICENSE

Community examples

tantonijevic at Nov 9, 2018 dplyr v0.7.7

# NOT RUN { if (require("nycflights13")) { carriers <- group_by(flights, carrier) summarise(carriers, n()) mutate(carriers, n = n()) filter(carriers, n() < 100) } # }