File: checkComplex.R

package info (click to toggle)
r-cran-checkmate 2.3.4-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,512 kB
  • sloc: ansic: 2,211; sh: 9; makefile: 8
file content (47 lines) | stat: -rw-r--r-- 1,349 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#' Check if an argument is a vector of type complex
#'
#' @templateVar fn Complex
#' @template x
#' @template na-handling
#' @inheritParams checkVector
#' @template typed.missing
#' @template null.ok
#' @template checker
#' @family basetypes
#' @useDynLib checkmate c_check_complex
#' @export
#' @examples
#' testComplex(1)
#' testComplex(1+1i)
checkComplex = function(x, any.missing = TRUE, all.missing = TRUE, len = NULL, min.len = NULL, max.len = NULL, unique = FALSE, names = NULL, typed.missing = FALSE, null.ok = FALSE) {
  .Call(c_check_complex, x, any.missing, all.missing, len, min.len, max.len, unique, names, typed.missing, null.ok)
}

#' @export
#' @rdname checkComplex
check_complex = checkComplex

#' @export
#' @include makeAssertion.R
#' @template assert
#' @rdname checkComplex
assertComplex = makeAssertionFunction(checkComplex, c.fun = "c_check_complex", use.namespace = FALSE)

#' @export
#' @rdname checkComplex
assert_complex = assertComplex

#' @export
#' @include makeTest.R
#' @rdname checkComplex
testComplex = makeTestFunction(checkComplex, c.fun = "c_check_complex")

#' @export
#' @rdname checkComplex
test_complex = testComplex

#' @export
#' @include makeExpectation.R
#' @template expect
#' @rdname checkComplex
expect_complex = makeExpectationFunction(checkComplex, c.fun = "c_check_complex", use.namespace = FALSE)