fct_shuffle: Randomly permute factor levels

View source: R/shuffle.R

fct_shuffleR Documentation

Randomly permute factor levels

Description

Randomly permute factor levels

Usage

fct_shuffle(f)

Arguments

f

A factor (or character vector).

Examples

f <- factor(c("a", "b", "c"))
fct_shuffle(f)
fct_shuffle(f)

forcats documentation built on Feb. 16, 2023, 8:57 p.m.