top_n_group: Select top (or bottom) n rows for each group (by value)

View source: R/top_n_group.R

top_n_groupR Documentation

Select top (or bottom) n rows for each group (by value)

Description

Select top (or bottom) n rows for each group (by value)

Usage

top_n_group(df, n, wt, ...)

Arguments

df

A tibble to filter

n

number of rows to return for each group

wt

(Optional). The variable to use for ordering. If not specified, defaults to the last variable in the tbl.

...

Optional columns to group by


scottfrechette/funcyfrech documentation built on Aug. 26, 2022, 9:13 a.m.