positioning_rearranger_: Wrapper for running positioning rearrange methods

View source: R/rearrangers.R

positioning_rearranger_R Documentation

Wrapper for running positioning rearrange methods

Description

Wrapper for running positioning rearrange methods

Usage

positioning_rearranger_(
  data,
  col = NULL,
  position = NULL,
  shuffle_sides = FALSE,
  what = "max"
)

Arguments

data

data.frame or vector.

col

Column to create sorting factor by. When `NULL` and `data` is a data.frame, the row numbers are used.

position

Index or quantile (in 0-1) at which to position the element of interest.

shuffle_sides

Whether to shuffle which elements are left and right of the position. (Logical)

what

What to position. "max" or "min". (Character)

Value

Sorted data.frame (tibble) / vector.


rearrr documentation built on April 4, 2025, 1:07 a.m.