order_levs: Order the levels of one factor by the values of another

View source: R/utils.R

order_levsR Documentation

Order the levels of one factor by the values of another

Description

[Deprecated]

This function will be deprecated because it is just recapitulating functionality provided by ggplot2::facet_grid(). If you are using this function and don't want it it go away, please get in touch and let me know what you're using it for.

order_levs() takes two factors, the first of which has values that are nested within the values of the second, and orders the levels of the first factor such that they are clustered within the second factor.

Usage

order_levs(f1, ...)

Arguments

f1

The factor to re-order. Levels of this factor must be nested within f2

f2

The factor to use when re-ordering f1.

Value

A factor that has the same levels as f1, but that has been re-ordered.


JCSzamosi/aftersl1p documentation built on July 3, 2025, 8:37 p.m.