arrange.: Arrange/reorder rows

View source: R/arrange.R

arrange.R Documentation

Arrange/reorder rows

Description

Order rows in ascending or descending order.

Usage

arrange.(.df, ...)

Arguments

.df

A data.frame or data.table

...

Variables to arrange by

Examples

df <- data.table(
  a = 1:3,
  b = 4:6,
  c = c("a", "a", "b")
)

df %>%
  arrange(c, -a)

df %>%
  arrange(c, desc(a))

mtfairbanks/gdt documentation built on Dec. 3, 2022, 6:50 a.m.