Learn R Programming

Rdpack (version 0.4-4)

.asym_compare: Tensor comparison and asymmetric comparison between two vectors

Description

Tensor comparison and asymmetric comparison between two vectors.

Usage

.ocompare(x, y)

.asym_compare(x, y)

Arguments

x
y

Value

  • For .ocompare, a matrix as described in Details. For .asym_compare a list with indices as follows.
  • i_newnew elements, indices in x of elements that are not in y.
  • i_removedremoved elements, indices in y of elements that are not in x.
  • i_commoncommon elements, indices in x of elements that are in both, x and y.

Details

.ocompare (for "outer compare") returns a matrix whose (i,j)th element is TRUE if x[i] is identical to y[j], and FALSE otherwise. .asym_compare calls .ocompare and iterprets its result asymmetrically. Elements of x that are not in y ae considered "new". Similarly, Elements of y that are not in x ae considered "removed". Elements that are in both are "common". Todo: check if the above is correct or the other way round! !!!

Examples

Run this code
##---- Should be DIRECTLY executable !! ----

Run the code above in your browser using DataLab