isNumber | R Documentation |
Scalar represents a length of 1.
isNumber(x, nullOk = FALSE)
isScalar(x, nullOk = FALSE)
isScalarAtomic(x, nullOk = FALSE)
isScalarCharacter(x, nullOk = FALSE)
isScalarDouble(x, nullOk = FALSE)
isScalarInteger(x, nullOk = FALSE)
isScalarIntegerish(x, nullOk = FALSE)
isScalarList(x, nullOk = FALSE)
isScalarLogical(x, nullOk = FALSE)
isScalarNumeric(x, nullOk = FALSE)
isScalarVector(x, nullOk = FALSE)
isNonScalar(x)
x |
Object. |
nullOk |
|
TRUE
on success;
FALSE
on failure, with cause set.
isNumber()
: Alias for isScalarNumeric()
.
Updated 2021-10-08.
help(topic = "scalar-type-predicates", package = "rlang")
.
assertive.properties::is_scalar()
.
rlang::is_scalar_atomic()
.
rlang::is_scalar_character()
.
rlang::is_scalar_double()
.
rlang::is_scalar_integer()
.
rlang::is_scalar_integerish()
.
rlang::is_scalar_list()
.
rlang::is_scalar_logical()
rlang::is_scalar_vector()
.
## TRUE ====
isScalar("a")
isScalarInteger(1L)
isScalarIntegerish(1)
## FALSE ====
isScalar(NULL)
isScalar(c("a", "b"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.