
Randomize feature order to eliminate any position-dependent effects
Source:R/utils.R
randomize_feature_order.Rd
Randomize feature order to eliminate any position-dependent effects
Examples
dat <- data.frame(
outcome = c("1", "2", "3"),
a = 4:6, b = 7:9, c = 10:12, d = 13:15
)
randomize_feature_order(dat, "outcome")
#> outcome c d a b
#> 1 1 10 13 4 7
#> 2 2 11 14 5 8
#> 3 3 12 15 6 9