is.equivalent: equivalence class

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/is.equivalent.R

Description

Checks if two vectors or two data frames are from the same equivalence class

Usage

1
is.equivalent(x, y, tollerance = .Machine$double.eps^0.5)

Arguments

x

either a numeric vector, or a data.frame containing such vectors.

y

either a numeric vector, or a data.frame containing such vectors.

tollerance

numeric >= 0. Differences smaller than tolerance are not considered.

Value

logical TRUE if the two vectors are from the same equivalence class.

Author(s)

Matthias Templ

References

Filzmoser, P., Hron, K., Templ, M. (2018) Applied Compositional Data Analysis. Springer, Cham.

See Also

all.equal

Examples

1
2
3
4
5
6
7
8
is.equivalent(1:10, 1:10*2)
is.equivalent(1:10, 1:10+1)
data(expenditures)
x <- expenditures
is.equivalent(x, constSum(x))
y <- x
y[1,1] <- x[1,1]+1
is.equivalent(y, constSum(x))

robCompositions documentation built on Jan. 13, 2021, 10:07 p.m.