Learn R Programming

rlang (version 0.1.6)

scalar-type-predicates: Scalar type predicates

Description

These predicates check for a given type and whether the vector is "scalar", that is, of length 1.

Usage

is_scalar_list(x)

is_scalar_atomic(x)

is_scalar_vector(x)

is_scalar_integer(x)

is_scalar_double(x)

is_scalar_character(x, encoding = NULL)

is_scalar_logical(x)

is_scalar_raw(x)

is_string(x, encoding = NULL)

is_scalar_bytes(x)

Arguments

x

object to be tested.

encoding

Expected encoding of a string or character vector. One of UTF-8, latin1, or unknown.

See Also

type-predicates, bare-type-predicates