split_: Split a data frame in groups based on variables

View source: R/split_.R

split_R Documentation

Split a data frame in groups based on variables

Description

Split a data frame in groups based on variables

Usage

split_(.data, .vars, sep = ".", ...)

Arguments

.data

a data frame.

.vars

character vector with the names of the columns for which the data frame will be divided.

sep

a character string to separate the terms.

...

additional potential arguments passed to split

Value

a list whose elements are the data frames with the groups defined by the combinations of the chosen variables.

Examples

data(invented_wages)
split_(invented_wages, .vars = c("gender"))
split_(invented_wages, .vars = c("gender", "sector"))

gibonet/cuber documentation built on Dec. 24, 2024, 5:17 p.m.