File: isSpecialValue.R

package info (click to toggle)
r-cran-paramhelpers 1.12-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 984 kB
  • sloc: ansic: 260; sh: 13; makefile: 2
file content (14 lines) | stat: -rw-r--r-- 349 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#' @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 [\code{logical(1)}].
#' @export
isSpecialValue = function(par, x) {
  any(vlapply(par$special.vals, function(special.val) isTRUE(all.equal(x, special.val))))
}