R/isSpecialValue.R

Defines functions isSpecialValue

Documented in isSpecialValue

#' @title Is a given value in the list of special values for a param?
#'
#' @description
#' See title.
#'
#' @template arg_par
#' @param x (any) \cr
#'   Single value to check.
#' @return `logical(1)`.
#' @export
isSpecialValue = function(par, x) {
  any(vlapply(par$special.vals, function(special.val) isTRUE(all.equal(x, special.val))))
}

Try the ParamHelpers package in your browser

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

ParamHelpers documentation built on July 4, 2022, 5:07 p.m.