Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

grouped_df

A grouped data frame.


Description

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

These functions are designed for programmatic use. For data analysis purposes see group_data() for the accessor functions that retrieve various metadata from a grouped data frames.

Usage

grouped_df(data, vars, drop = group_by_drop_default(data))

is.grouped_df(x)

is_grouped_df(x)

Arguments

data

a tbl or data frame.

vars

A character vector.

drop

When .drop = TRUE, empty groups are dropped.


dplyr

A Grammar of Data Manipulation

v1.0.6
MIT + file LICENSE
Authors
Hadley Wickham [aut, cre] (<https://orcid.org/0000-0003-4757-117X>), Romain François [aut] (<https://orcid.org/0000-0002-2444-4226>), Lionel Henry [aut], Kirill Müller [aut] (<https://orcid.org/0000-0002-1416-3412>), RStudio [cph, fnd]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.