check-scalar-isScalar: Is the input scalar?

isNumberR Documentation

Is the input scalar?

Description

Scalar represents a length of 1.

Usage

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)

Arguments

x

Object.

nullOk

logical(1). If set to TRUE, x may also be NULL.

Value

TRUE on success; FALSE on failure, with cause set.

Functions

  • isNumber(): Alias for isScalarNumeric().

Note

Updated 2021-10-08.

See Also

  • 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().

Examples

## TRUE ====
isScalar("a")
isScalarInteger(1L)
isScalarIntegerish(1)

## FALSE ====
isScalar(NULL)
isScalar(c("a", "b"))

acidgenomics/goalie documentation built on Dec. 11, 2023, 11:36 p.m.