dplyr (version 0.1.2)

grouped_dt: A grouped data table.

Description

The easiest way to create a grouped data table is to call the group_by method on a data table or tbl: this will take care of capturing the unevalated expressions for you.

Usage

grouped_dt(data, vars)

is.grouped_dt(x)

Arguments

data
a tbl or data frame.
vars
a list of quoted variables.
x
an object to check

Examples

Run this code
if (require("hflights")) {
hflights_dt <- tbl_dt(hflights)
group_size(group_by(hflights_dt, Year, Month, DayofMonth))
group_size(group_by(hflights_dt, Dest))

monthly <- group_by(hflights_dt, Month)
summarise(monthly, n = n(), delay = mean(ArrDelay))
}

Run the code above in your browser using DataCamp Workspace