Learn R Programming

nuggets (version 1.2.0)

which_antichain: Return indices of first elements of the list, which are incomparable with preceding elements.

Description

The function returns indices of elements from the given list x, which are incomparable (i.e., it is neither subset nor superset) with any preceding element. The first element is always selected. The next element is selected only if it is incomparable with all previously selected elements.

Usage

which_antichain(x, distance = 0)

Value

an integer vector of indices of selected (incomparable) elements.

Arguments

x

a list of integerish vectors

distance

a non-negative integer, which specifies the allowed discrepancy between compared sets

Author

Michal Burda