predicate-utils {arkhe}R Documentation

Utility Predicates

Description

Usage

has_length(x, n = NULL)

is_empty(x)

has_names(x, names = NULL)

has_missing(x)

has_infinite(x)

is_unique(x, tolerance = sqrt(.Machine$double.eps), na.rm = FALSE)

has_duplicates(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.

names

A character vector specifying the names to test x with. If NULL, returns TRUE if x has names, and FALSE otherwise.

tolerance

A numeric scalar giving the tolerance to check within (for numeric vector).

na.rm

A logical scalar: should missing values (including NaN) be omitted?

Value

A logical scalar.

See Also

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


[Package arkhe version 1.6.0 Index]