Learn R Programming

couplr (version 1.0.10)

is_distance_object: Check if Object is a Distance Object

Description

Check if Object is a Distance Object

Usage

is_distance_object(x)

Value

Logical: TRUE if x is a distance_object

Arguments

x

Object to check

Examples

Run this code
left <- data.frame(id = 1:3, x = c(1, 2, 3))
right <- data.frame(id = 4:6, x = c(1.1, 2.1, 3.1))
dist_obj <- compute_distances(left, right, vars = "x")
is_distance_object(dist_obj)  # TRUE
is_distance_object(list())    # FALSE

Run the code above in your browser using DataLab