Learn R Programming

rearrr (version 0.3.4)

positioning_rearranger_: 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"
)

Value

Sorted data.frame (tibble) / vector.

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)