Learn R Programming

forcats (version 0.0.0.9000)

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