checkString(x, na.ok = FALSE)assertString(x, na.ok = FALSE, add = NULL, .var.name)
assert_string(x, na.ok = FALSE, add = NULL, .var.name)
testString(x, na.ok = FALSE)
test_string(x, na.ok = FALSE)
expect_string(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, assertString/assert_string
throws an error message, testString/test_string
returns FALSE,
and checkString returns a string with the error message.
The function expect_string always returns an
expectation.NA, NA_integer_, NA_real_, NA_complex_
NA_character_ and NaN.checkCount,
checkFlag, checkInt,
checkNumber, checkScalarNA,
checkScalartestString("a")
testString(letters)Run the code above in your browser using DataLab