| checkScalarNA {checkmate} | R Documentation |
Check if an argument is a single missing value
checkScalarNA(x) assertScalarNA(x, .var.name) testScalarNA(x)
x |
[any] |
.var.name |
[character(1)] |
Depending on the function prefix:
If the check is successful, all functions return TRUE.
If the check is not successful, assertScalarNA throws an error message,
testScalarNA returns FALSE and checkScalarNA returns
a string with the error message.
Other scalars: assertCount,
checkCount, testCount;
assertFlag, checkFlag,
testFlag; assertInt,
checkInt, testInt;
assertNumber, checkNumber,
testNumber; assertPercentage,
checkPercentage,
testPercentage; assertScalar,
checkScalar, testScalar;
assertString, checkString,
testString
testScalarNA(1) testScalarNA(NA_real_) testScalarNA(rep(NA, 2))