relocate_with {name}R Documentation

Relocate columns

Description

Relocate columns

Usage

relocate_with(
  .data,
  .fn,
  .cols = everything(),
  .before = NULL,
  .after = NULL,
  ...
)

Arguments

.data

A data.frame or tibble.

.fn

A function to reorder .cols.

.cols

Columns to move

.before, .after

Destination of columns. If both selected, errors. If neither, moves to right of first selected column.

...

additional arguments to pass to .fn

Value

And object with same type as .data.

Examples

data(sd)
sd |> relocate_with(sort)

[Package name version 0.0.1 Index]