Learn R Programming

mvalpha (version 0.5.1)

set_ops: Efficient Set Operations

Description

Find the intersection and set difference(s) of two sets all at once and more efficiently than calling base::intersect() and base::setdiff() separately. Based on this stackoverflow answer https://stackoverflow.com/a/72631719

Usage

set_ops(A, B, type)

Arguments

A, B

sets (vectors) of elements

type

a string describing the data type of the label set. This can be "nominal", "ordinal", "interval", or "ratio" and is used to select the appropriate distance metric.