mvl_find_matches: Find matching rows

View source: R/RMVL.R

mvl_find_matchesR Documentation

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)

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.

Value

A list of matches and match stretches

See Also

mvl_hash_vectors, mvl_order_vectors, mvl_group, mvl_find_matches, mvl_indexed_copy, mvl_merge

Examples

## Not run: 
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]))

## End(Not run)

RMVL documentation built on Nov. 2, 2023, 6:09 p.m.

Related to mvl_find_matches in RMVL...