Examples for 'forcats::fct_shuffle'


Randomly permute factor levels

Aliases: fct_shuffle

Keywords:

### ** Examples

f <- factor(c("a", "b", "c"))
fct_shuffle(f)
[1] a b c
Levels: a c b
fct_shuffle(f)
[1] a b c
Levels: b c a

[Package forcats version 0.5.1 Index]