predicate-attributes: Attributes Predicates

predicate-attributesR Documentation

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)

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.

Value

A logical scalar.

See Also

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


tesselle/arkhe documentation built on Feb. 1, 2025, 9:24 a.m.