R/zzz.R

Defines functions dummy_import .onLoad

#' @import data.table
#' @import checkmate
#' @import paradox
#' @import mlr3misc
#' @importFrom R6 R6Class is.R6
#' @importFrom utils data head tail
#' @importFrom stats reformulate
#' @importFrom uuid UUIDgenerate
"_PACKAGE"

dummy_import = function() {
  # nocov start
  # this function is required to silence R CMD check
  Metrics::ce
  mlbench::mlbench.xor
} # nocov end


.onLoad = function(libname, pkgname) {
  # nocov start
  backports::import(pkgname)

  # setup logger
  assign("lg", lgr::get_logger(pkgname), envir = parent.env(environment()))
  if (Sys.getenv("IN_PKGDOWN") == "true") {
    lg$set_threshold("warn")
  }
} # nocov end
mllg/mlr3 documentation built on Sept. 27, 2019, 9:38 a.m.