checkScalar(x, na.ok = FALSE)assertScalar(x, na.ok = FALSE, add = NULL, .var.name = NULL)
assert_scalar(x, na.ok = FALSE, add = NULL, .var.name = NULL)
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.NULL || character(1)]
Name of the checked object to print in error message. If NULL,
the name will be heuristically determined via 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