Learn R Programming

fastR (version 0.10.3)

givenOrder: Create ordered factor with order inferred from order given

Description

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

Run this code
# NOT RUN {
givenOrder(c("First", "Second", "Third", "Fourth", "Fifth", "Sixth"))
# }

Run the code above in your browser using DataLab