shuffle_group: Shuffle the rows in a column

View source: R/compare_models.R

shuffle_groupR Documentation

Shuffle the rows in a column

Description

Shuffle the rows in a column

Usage

shuffle_group(dat, col_name)

Arguments

dat

a data frame containing col_name

col_name

column name to shuffle

Value

dat with the rows of col_name shuffled

Author(s)

Courtney R Armour, armourc@umich.edu

Examples

## Not run: 
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")

## End(Not run)

SchlossLab/mikropml documentation built on Aug. 24, 2023, 9:51 p.m.