R/param_min_unique.R

Defines functions min_unique

Documented in min_unique

#' Number of unique values for pre-processing
#'
#' Some pre-processing parameters require a minimum number of unique data points
#' to proceed.
#'
#' @inheritParams Laplace
#' @examples
#' min_unique()
#' @export
min_unique <- function(range = c(5L, 15L), trans = NULL) {
  new_quant_param(
    type = "integer",
    range = range,
    inclusive = c(TRUE, TRUE),
    trans = trans,
    default = 10,
    label = c(min_unique = "Unique Value Threshold"),
    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 Sept. 10, 2021, 5:06 p.m.