fct_shuffle {forcats}R Documentation

Randomly permute the levels of a factor

Description

Randomly permute the levels of a factor

Usage

fct_shuffle(f)

Arguments

f

A factor

Examples

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

[Package forcats version 0.1.1 Index]