Function to determine whether an object x is a dist object.

is_dist(x)

Arguments

x

The object to test

Value

Logical indicating whether x is a dist object.

Examples

is_dist(normal(0, 1))   # TRUE
#> [1] TRUE
is_dist(42)             # FALSE
#> [1] FALSE