gsu: Group, slice, and ungroup again.

Description Usage Arguments Value Examples

View source: R/dplyr-add-ons.R

Description

Short-hand function to group data, slice within groupings, and ungroup.

Usage

1
gsu(.data, ..., .slices = 1)

Arguments

.data

Data frame.

...

Unquoted grouping columns.

.slices

Vector of slice numbers.

Value

An object with the same class as .data.

Examples

1
2
iris %>%
  gsu(Species, .slices = c(1, 5, 10))

mattwarkentin/sandbox documentation built on Jan. 29, 2020, 4:46 p.m.