order_appeared: Set levels of a factor to the order appeared in data

Description Usage Arguments Value Examples

View source: R/order_appeared.R

Description

Set levels of a factor to the order appeared in data

Usage

1

Arguments

x

a vector or a factor

Value

a factor with levels in the order appeared in x. This function will only return unique x levels,

Examples

1
order_appeared (c("pear","apple","banana","banana","apple"))

yanchaoluo/foofactors documentation built on May 18, 2019, 9:15 p.m.