powered by
Shuffle the rows in a column
shuffle_group(dat, col_name)
dat with the rows of col_name shuffled
dat
col_name
a data frame containing col_name
column name to shuffle
Courtney R Armour, armourc@umich.edu
if (FALSE) { set.seed(123) df <- dplyr::tibble( condition = c("a", "a", "b", "b"), AUC = c(.2, 0.3, 0.8, 0.9) ) shuffle_group(df, "condition") }
Run the code above in your browser using DataLab