relevel.tiny_labelled: Reorder Levels of Labelled Factor

View source: R/methods-stats.R

relevel.tiny_labelledR Documentation

Reorder Levels of Labelled Factor

Description

The levels of a factor are re-ordered so that the level specified by ref is first and the others are moved down. This is a copy from relevel in the stats package, but preserves the label attribute and class tiny_labelled.

Usage

## S3 method for class 'tiny_labelled'
relevel(x, ref, ...)

Arguments

x

an unordered factor.

ref

the reference level, typically a string.

...

additional arguments for future methods.


tinylabels documentation built on April 4, 2025, 2:02 a.m.