Skip to contents
  • 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.