R/helper.R

Defines functions as_backend

as_backend = function(id) {
  # this looks a bit funny, but is required because of strange
  # behavior with roxygen2/pkgload
  ee = new.env(hash = FALSE, parent = emptyenv())
  data(list = id, package = "mlr3data", envir = ee)
  mlr3::as_data_backend(ee[[id]])
}
mlr-org/mlr3data documentation built on Nov. 10, 2024, 10:40 a.m.