ismembertol: Tolerant alternative to ismember

View source: R/ismember.R

ismembertolR Documentation

Tolerant alternative to ismember

Description

Does the

Usage

ismembertol(A, B, rows = FALSE, indices = TRUE)

Arguments

A

a vector, matrix or dataframe

B

another vector, matrix or dataframe

rows

if TRUE, each row of A and each row of B are treated as single entities

indices

if TRUE, outputs the lowest B index for each match in A

Value

Same as ismember

Author(s)

Waldir Leoncio

See Also

ismember

Examples

x <- t(1:6) * pi
y <- 10 ^ log10(x)

# Show that values are equal, but not identical (due to floating-point error)
all.equal(x, y)
identical(x, y)

# Checking the difference in outputs
ismember(x, y)
ismembertol(x, y)


matlab2r documentation built on Feb. 16, 2023, 10:39 p.m.