tests/testthat/helper.R

library(checkmate)

ssample = function(lvls, N) {
  x = c(lvls, sample(lvls, N - length(lvls), replace = TRUE))
  factor(sample(x), levels = lvls)
}

Try the mlr3measures package in your browser

Any scripts or data that you put into this service are public.

mlr3measures documentation built on Aug. 5, 2022, 5:22 p.m.