moveToFront: Move elements to the start of a vector

View source: R/dataFrame.R

moveToFrontR Documentation

Move elements to the start of a vector

Description

Move elements to the start of a vector

Usage

moveToFront(x, elements)

Arguments

x

vector

elements

elements out of x to be moved to the front

Value

vector with elements coming first

Examples

moveToFront(1:10, 5)
moveToFront(c("a", "b", "c", "x", "y", "d"), c("x", "y"))
  

KWB-R/kwb.utils documentation built on April 1, 2024, 7:12 a.m.