levelOrder: Reorder factor levels.

View source: R/factors.R

levelOrderR Documentation

Reorder factor levels.

Description

None yet.

Usage

levelOrder(f, new.order)

Arguments

f

A factor.

new.order

A character vector containing all and only the levels of f, in the desired order.

Details

Reorders the levels of factor f as specified in new.order, which must contain all and only the existing levels of f (including unused levels), but in the desired order. If new.order and levels(f) do not contain exactly the same elements, then do nothing.

Value

A factor.

Author(s)

Dave Braze davebraze@gmail.com

See Also

factor levels relevel


davebraze/FDButils documentation built on Feb. 24, 2023, 12:14 a.m.