File: isSpecialValue.R

package info (click to toggle)
r-cran-paramhelpers 1.14.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 992 kB
  • sloc: ansic: 102; sh: 13; makefile: 2
file content (13 lines) | stat: -rw-r--r-- 341 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
#' @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))))
}