match_list | R Documentation |
Match list elements to another list
match_list(x, y, ...)
x , y |
|
... |
additional arguments are ignored. |
This function takes two list
objects, and matches
the first list
elements to the second list
.
Each list contains list elements, for example if x
is a list
, then the element in position i
is accessed
using x[[i]]
.
A match between x[[i]]
and y[[j]]
is defined as follows:
all elements in x[[i]]
are contained in y[[j]]
all elements in y[[j]]
are contained in x[[i]]
For this function, item order and item duplication is ignored.
This function uses logic in the form all(x[[i]] %in% y[[j]])
,
so it will operate properly with input objects compatible
with that format. The function is intended to be used with
list
that contains atomic
vectors
.
integer
vector
with the same length as x
. The
integer values give the position in y
of the first match.
Other venndir utility:
curate_venn_labels()
,
expand_range()
,
make_color_contrast()
,
make_venn_combn_df()
,
make_venn_test()
,
modify_venndir_overlap()
,
nudge_venndir_label()
,
plot,Venndir,ANY-method
,
print_color_df()
,
shrink_df()
,
three_point_angle()
,
venndir_legender()
,
venndir_to_df()
x <- list(a=LETTERS[1],
b=LETTERS[1:2],
c=LETTERS[2:4]);
x;
y <- list(
d=LETTERS[1:2],
e=LETTERS[2],
f=LETTERS[2:4]);
y;
match_list(x, y)
match_list(y, x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.