Learn R Programming

tidytidbits (version 0.3.2)

order_factor_by: Reorder a factor

Description

Makes f a factor ordered according to ... (which is passed to order)

Usage

order_factor_by(.f, ...)

Arguments

.f

A factor

...

Passed to order(). Should be vectors of the same size as .f.

Value

Reordered factor

Details

This is a thin wrapper around forcats::fct_reorder(), which is unintuitive in conjunction with order().

See Also

rename_reorder_factor, rename_factor, forcats::fct_reorder