Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

arrange_across..html

Arrange by a selection of variables


Description

Arrange all rows in either ascending or descending order by a selection of variables.

Usage

arrange_across.(.df, .cols = everything(), .fns = NULL)

Arguments

.df

A data.table or data.frame

.cols

vector c() of unquoted column names. tidyselect compatible.

.fns

Function to apply. If desc it arranges in descending order

Examples

test_df <- tidytable(a = c("a", "b", "a"), b = 3:1)

test_df %>%
  arrange_across.()

test_df %>%
  arrange_across.(a, desc.)

tidytable

Tidy Interface to 'data.table'

v0.6.1
MIT + file LICENSE
Authors
Mark Fairbanks [aut, cre], Abdessabour Moutik [ctb], Matt Carlson [ctb], Ivan Leung [ctb], Ross Kennedy [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.