checkScalar(x, na.ok = FALSE)assertScalar(x, na.ok = FALSE, add = NULL, .var.name)
assert_scalar(x, na.ok = FALSE, add = NULL, .var.name)
testScalar(x, na.ok = FALSE)
test_scalar(x, na.ok = FALSE)
expect_scalar(x, na.ok = FALSE, info = NULL, label = NULL)
logical(1)]
Are missing values allowed? Default is FALSE.AssertCollection]
Collection to store assertions. See AssertCollection.x. Defaults to a heuristic to determine
the name using deparse and substitute.expect_that..var.name, but passed down to expect_that.TRUE. If the check
is not successful, assertScalar/assert_scalar
throws an error message, testScalar/test_scalar
returns FALSE,
and checkScalar returns a string with the error message.
The function expect_scalar always returns an
expectation.NA, NA_integer_, NA_real_, NA_complex_
NA_character_ and NaN.checkCount,
checkFlag, checkInt,
checkNumber, checkScalarNA,
checkString