R/shuffle.R
fct_shuffle.Rd
Randomly permute factor levels
fct_shuffle(f)
A factor (or character vector).
f <- factor(c("a", "b", "c")) fct_shuffle(f) #> [1] a b c #> Levels: a b c fct_shuffle(f) #> [1] a b c #> Levels: a c b