| checkComplex | R Documentation |
Check if an argument is a vector of type complex
checkComplex(
x,
any.missing = TRUE,
all.missing = TRUE,
len = NULL,
min.len = NULL,
max.len = NULL,
unique = FALSE,
names = NULL,
typed.missing = FALSE,
null.ok = FALSE
)
check_complex(
x,
any.missing = TRUE,
all.missing = TRUE,
len = NULL,
min.len = NULL,
max.len = NULL,
unique = FALSE,
names = NULL,
typed.missing = FALSE,
null.ok = FALSE
)
assertComplex(
x,
any.missing = TRUE,
all.missing = TRUE,
len = NULL,
min.len = NULL,
max.len = NULL,
unique = FALSE,
names = NULL,
typed.missing = FALSE,
null.ok = FALSE,
.var.name = vname(x),
add = NULL
)
assert_complex(
x,
any.missing = TRUE,
all.missing = TRUE,
len = NULL,
min.len = NULL,
max.len = NULL,
unique = FALSE,
names = NULL,
typed.missing = FALSE,
null.ok = FALSE,
.var.name = vname(x),
add = NULL
)
testComplex(
x,
any.missing = TRUE,
all.missing = TRUE,
len = NULL,
min.len = NULL,
max.len = NULL,
unique = FALSE,
names = NULL,
typed.missing = FALSE,
null.ok = FALSE
)
test_complex(
x,
any.missing = TRUE,
all.missing = TRUE,
len = NULL,
min.len = NULL,
max.len = NULL,
unique = FALSE,
names = NULL,
typed.missing = FALSE,
null.ok = FALSE
)
expect_complex(
x,
any.missing = TRUE,
all.missing = TRUE,
len = NULL,
min.len = NULL,
max.len = NULL,
unique = FALSE,
names = NULL,
typed.missing = FALSE,
null.ok = FALSE,
info = NULL,
label = vname(x)
)
x |
[ |
any.missing |
[ |
all.missing |
[ |
len |
[ |
min.len |
[ |
max.len |
[ |
unique |
[ |
names |
[ |
typed.missing |
[ |
null.ok |
[ |
.var.name |
[ |
add |
[ |
info |
[ |
label |
[ |
This function does not distinguish between
NA, NA_integer_, NA_real_, NA_complex_
NA_character_ and NaN.
Depending on the function prefix:
If the check is successful, the functions
assertComplex/assert_complex return
x invisibly, whereas
checkComplex/check_complex and
testComplex/test_complex return
TRUE.
If the check is not successful,
assertComplex/assert_complex
throws an error message,
testComplex/test_complex
returns FALSE,
and checkComplex/check_complex
return a string with the error message.
The function expect_complex always returns an
expectation.
Other basetypes:
checkArray(),
checkAtomic(),
checkAtomicVector(),
checkCharacter(),
checkDataFrame(),
checkDate(),
checkDouble(),
checkEnvironment(),
checkFactor(),
checkFormula(),
checkFunction(),
checkInteger(),
checkIntegerish(),
checkList(),
checkLogical(),
checkMatrix(),
checkNull(),
checkNumeric(),
checkPOSIXct(),
checkRaw(),
checkVector()
testComplex(1)
testComplex(1+1i)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.