% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/group-size.r
\name{group_size}
\alias{group_size}
\alias{n_groups}
\title{Calculate group sizes.}
\usage{
group_size(x)

n_groups(x)
}
\arguments{
\item{x}{a grouped tbl}
}
\description{
Calculate group sizes.
}
\examples{
if (require("nycflights13")) {

by_day <- flights \%>\% group_by(year, month, day)
n_groups(by_day)
group_size(by_day)

by_dest <- flights \%>\% group_by(dest)
n_groups(by_dest)
group_size(by_dest)
}
}
\seealso{
Other grouping functions: \code{\link{group_by_all}},
  \code{\link{group_by}}, \code{\link{group_indices}},
  \code{\link{group_keys}}, \code{\link{group_map}},
  \code{\link{group_nest}}, \code{\link{group_rows}},
  \code{\link{group_trim}}, \code{\link{groups}}
}
\concept{grouping functions}
\keyword{internal}
