forcats (version 0.1.1)

fct_shuffle: Randomly permute the levels of a factor

Description

Randomly permute the levels of a factor

Usage

fct_shuffle(f)

Arguments

f
A factor

Examples

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

Run the code above in your browser using DataLab