Learn R Programming

saros (version 1.6.1)

arrange_with_order: Apply sorting with optional descending order

Description

Unified helper to consistently handle ascending/descending sort order across all sorting functions.

Usage

arrange_with_order(data, order_col, descend = FALSE)

Value

Arranged dataset

Arguments

data

Dataset to arrange

order_col

Symbol/name of the column to sort by

descend

Whether to sort in descending order