dot-getGroups: Return the first n groups of a grouped data.frame

.getGroupsR Documentation

Return the first n groups of a grouped data.frame

Description

Useful for debugging, e.g. when trying to fill by but groups contain multiple values. Group order is determined by dplyr::group_rows

Usage

.getGroups(df, i = 1, n = 1, row_idxs = NULL)

Arguments

df

A grouped data.frame

i

(integer(1), default: 1) The index of the first group to return

n

(integer(1), default: 1) How many groups should be returned?

row_idxs

(Optional, default: NULL) Indices of rows

Value

Rows of grouped data.frame df corresponding to group i, where the grouping order is determined by dplyr.

Author(s)

Helen Lindsay


HelenLindsay/AbNames documentation built on June 6, 2023, 1:18 p.m.