vec_prioritise: Rearrange vector based on priorities

View source: R/utils-hammr.R

vec_prioritiseR Documentation

Rearrange vector based on priorities

Description

Shoves elements of a character vector to the front or back. Throws a warning if any elements of 'high' or 'low' are not present in 'x'.

Usage

vec_prioritise(x, high = NULL, low = NULL)

Arguments

x

a character vector

high

elements to be put to the front

low

elements to be put to the back

Value

a reordered vector


tatoo documentation built on March 31, 2023, 8:16 p.m.