R/flt.R

Defines functions flts flt

Documented in flt flts

#' @title Syntactic Sugar for Filter Construction
#'
#' @description
#' These functions complements [mlr_filters] with a function in the spirit of [mlr3::mlr_sugar].
#'
#' @inheritParams mlr3::mlr_sugar
#' @return [Filter].
#' @export
#' @examples
#' flt("correlation", method = "kendall")
#' flts(c("mrmr", "jmim"))
flt = function(.key, ...) {
  dictionary_sugar_get(mlr_filters, .key, ...)
}

#' @rdname flt
#' @export
flts = function(.keys, ...) {
  dictionary_sugar_mget(mlr_filters, .keys, ...)
}

Try the mlr3filters package in your browser

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

mlr3filters documentation built on Feb. 16, 2023, 7:29 p.m.