slice_rows: Slice a data frame into groups of rows

View source: R/rows.R

slice_rowsR Documentation

Slice a data frame into groups of rows

Description

slice_rows() is equivalent to dplyr's dplyr::group_by() command but it takes a vector of column names or positions instead of capturing column names with special evaluation. unslice() removes the slicing attributes.

Usage

slice_rows(.d, .cols = NULL)

unslice(.d)

Arguments

.d

A data frame to slice or unslice.

.cols

A character vector of column names or a numeric vector of column positions. If NULL, the slicing attributes are removed.

Value

A sliced or unsliced data frame.

See Also

by_slice() and dplyr::group_by()


purrrlyr documentation built on March 29, 2022, 5:05 p.m.