| checkRaw | R Documentation |
Check if an argument is a raw vector
checkRaw(
x,
len = NULL,
min.len = NULL,
max.len = NULL,
names = NULL,
null.ok = FALSE
)
check_raw(
x,
len = NULL,
min.len = NULL,
max.len = NULL,
names = NULL,
null.ok = FALSE
)
assertRaw(
x,
len = NULL,
min.len = NULL,
max.len = NULL,
names = NULL,
null.ok = FALSE,
.var.name = vname(x),
add = NULL
)
assert_raw(
x,
len = NULL,
min.len = NULL,
max.len = NULL,
names = NULL,
null.ok = FALSE,
.var.name = vname(x),
add = NULL
)
testRaw(
x,
len = NULL,
min.len = NULL,
max.len = NULL,
names = NULL,
null.ok = FALSE
)
test_raw(
x,
len = NULL,
min.len = NULL,
max.len = NULL,
names = NULL,
null.ok = FALSE
)
expect_raw(
x,
len = NULL,
min.len = NULL,
max.len = NULL,
names = NULL,
null.ok = FALSE,
info = NULL,
label = vname(x)
)
x |
[ |
len |
[ |
min.len |
[ |
max.len |
[ |
names |
[ |
null.ok |
[ |
.var.name |
[ |
add |
[ |
info |
[ |
label |
[ |
Depending on the function prefix:
If the check is successful, the functions
assertRaw/assert_raw return
x invisibly, whereas
checkRaw/check_raw and
testRaw/test_raw return
TRUE.
If the check is not successful,
assertRaw/assert_raw
throws an error message,
testRaw/test_raw
returns FALSE,
and checkRaw/check_raw
return a string with the error message.
The function expect_raw always returns an
expectation.
Other basetypes:
checkArray(),
checkAtomic(),
checkAtomicVector(),
checkCharacter(),
checkComplex(),
checkDataFrame(),
checkDate(),
checkDouble(),
checkEnvironment(),
checkFactor(),
checkFormula(),
checkFunction(),
checkInteger(),
checkIntegerish(),
checkList(),
checkLogical(),
checkMatrix(),
checkNull(),
checkNumeric(),
checkPOSIXct(),
checkVector()
testRaw(as.raw(2), min.len = 1L)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.