Learn R Programming

forcats (version 0.5.0)

fct_shuffle: Randomly permute factor levels

Description

Randomly permute factor levels

Usage

fct_shuffle(f)

Arguments

f

A factor (or character vector).

Examples

Run this code
# NOT RUN {
f <- factor(c("a", "b", "c"))
fct_shuffle(f)
fct_shuffle(f)
# }

Run the code above in your browser using DataLab