Learn R Programming

arkhe (version 1.10.0)

predicate-attributes: Attributes Predicates

Description

  • has_length() checks how long is an object.

  • is_empty() checks is an object is empty (any zero-length dimensions).

Usage

has_length(x, n = NULL)

is_empty(x)

Value

A logical scalar.

Arguments

x

A vector to be tested.

n

A length-one numeric vector specifying the length to test x with. If NULL, returns TRUE if x has length greater than zero, and FALSE otherwise.

See Also

Other predicates: is_scalar, predicate-data, predicate-matrix, predicate-names, predicate-numeric, predicate-trend, predicate-type