Skip to contents

The order of the resulting factor is determined by the order in which unique labels first appear in the vector or factor x.

Usage

givenOrder(x)

Arguments

x

a vector or factor to be converted into an ordered factor.

Examples

givenOrder(c("First", "Second", "Third", "Fourth", "Fifth", "Sixth"))
#> [1] First  Second Third  Fourth Fifth  Sixth 
#> Levels: First < Second < Third < Fourth < Fifth < Sixth