sort.grouped_df: Arrange by groups.

View source: R/wrangle.R

sort.grouped_dfR Documentation

Arrange by groups.

Description

As of 0.5, dplyr::arrange ignores groups. This function gives the old behavior as a method for generic base::sort. Borrowed from Ax3man at https://github.com/hadley/dplyr/issues/1206.

Usage

## S3 method for class 'grouped_df'
sort(x, decreasing = FALSE, ...)

Arguments

x

grouped_df

decreasing

logical (ignored)

...

further sort criteria

Value

grouped_df

Examples

library(dplyr)
head(sort(group_by(Theoph, Subject, Time)))

wrangle documentation built on Aug. 24, 2023, 9:07 a.m.