R/param_window_size.R

Defines functions window_size

Documented in window_size

#' Parameter for the moving window size
#'
#' Used in `recipes::step_window()` and `recipes::step_impute_roll()`.
#'
#' @inheritParams Laplace
#' @examples
#' window_size()
#' @export
window_size <- function(range = c(3L, 11L), trans = NULL) {
  new_quant_param(
    type = "integer",
    range = range,
    inclusive = c(TRUE, TRUE),
    trans = trans,
    label = c(window_size = "Window Size"),
    finalize = NULL
  )
}

Try the dials package in your browser

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

dials documentation built on April 12, 2025, 1:46 a.m.