powered by
Checks if two vectors or two data frames are from the same equivalence class
is.equivalent(x, y, tollerance = .Machine$double.eps^0.5)
logical TRUE if the two vectors are from the same equivalence class.
either a numeric vector, or a data.frame containing such vectors.
numeric >= 0. Differences smaller than tolerance are not considered.
Matthias Templ
Filzmoser, P., Hron, K., Templ, M. (2018) Applied Compositional Data Analysis. Springer, Cham.
all.equal
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))
Run the code above in your browser using DataLab