group_by: group_by a data.frame by chosen columns

group_byR Documentation

group_by a data.frame by chosen columns

Description

Group a data.frame by chosen columns

Usage

group_by_(df, group = NULL)

Arguments

df

data.frame

group

formula that describes the group

Value

The function returns a list. Each element of the list is a subset of data frame df. Subset is determined by variables given in group. Each data frame get the following properties:

  • Columns are not modified.

  • Only rows corresponding to the subset.

  • Data frame attributes are preserved.

Examples

tmp <- group_by_(CO2,~c(Type,Treatment))

tmp[[1]]

pv71u98h1/m61r documentation built on Oct. 20, 2024, 6:29 p.m.