align: ordering of vector

View source: R/order-as.R

alignR Documentation

ordering of vector

Description

Order a given vector, which may contain duplicates, according to the wanted order given by some other vector. Supercedes 'order_as' and 'order_by_list' in a single function.

Usage

align(x, template = NULL, group = NULL, all = TRUE, outgroup = ".Other")

Arguments

x

the vector that needs ordering

template

the wanted order

group

possible grouping

all

logical; should given elements not in template be kept?

outgroup

group name of elements not in template (if kept)


renlund/descripteur documentation built on July 5, 2025, 6:35 a.m.