dtplyr (version 0.0.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, copy = TRUE)

is.grouped_dt(x)

Arguments

data

a tbl or data frame.

vars

a list of quoted variables.

copy

If TRUE, will make copy of input.

x

an object to check

Examples

Run this code
# NOT RUN {
library(dplyr, warn.conflicts = FALSE)
if (require("nycflights13")) {
flights_dt <- tbl_dt(flights)
group_size(group_by(flights_dt, year, month, day))
group_size(group_by(flights_dt, dest))

monthly <- group_by(flights_dt, month)
summarise(monthly, n = n(), delay = mean(arr_delay))
}
# }

Run the code above in your browser using DataCamp Workspace