50% off | Unlimited Data & AI Learning

Last chance! 50% off unlimited learning

Sale ends in


RMVL (version 1.1.0.1)

mvl_find_matches: Find matching rows

Description

This function is passed two lists of MVL vectors which are interpreted in data.frame fashion. The indices of pairwise matches are returned in order of the arguments ("index1" and "index2"). In addition we return indices describing stretches with "index1" value constant ( stretch_index1[i] to stretch_index1[i+1]-1)

Usage

mvl_find_matches(L1, L2, indices1 = NULL, indices2 = NULL)

Value

A list of matches and match stretches

Arguments

L1

list of vector like MVL_OBJECTs

L2

list of vector like MVL_OBJECTs

indices1

list of indices into objects to sort. If absent or NULL it is assumed to be from 1 to the length of the object.

indices2

list of indices into objects to sort. If absent or NULL it is assumed to be from 1 to the length of the object.

See Also

mvl_hash_vectors, mvl_order_vectors, mvl_group, mvl_find_matches, mvl_indexed_copy, mvl_merge

Examples

Run this code
if (FALSE) {
Mtmp<-mvl_open("tmp_a.mvl", append=TRUE, create=TRUE)
mvl_write_object(Mtmp, data.frame(x=rep(c("a", "b"), 50), y=1:100), "df1")
mvl_write_object(Mtmp, data.frame(x=rep(c("b", "c"), 50), y=21:120), "df2")
Mtmp<-mvl_remap(Mtmp)
L<-mvl_find_matches(list(Mtmp$df1[,"x",ref=TRUE], Mtmp$df1[,"y", ref=TRUE]), 
                        list(Mtmp$df2[,"x",ref=TRUE], Mtmp$df2[,"y", ref=TRUE]))
}

Run the code above in your browser using DataLab