Make full Venn combination data.frame
Arguments
- x
either character vector of set names, or integer number of sets.
- include_zero
logical indicating whether to include one row with all zeros, in the event of counting factors where some factor levels may not be present in any sets.
- sep
character separator used when combining set names into a single label.
- ...
additional arguments are ignored.
Value
data.frame where rownames indicate each possible
Venn overlap, colnames indicate each set name, and values
are 0 or 1 indicating whether each set should have
a value in each row.
Details
This function returns a data.frame with all possible
combinations of set overlaps for the number of sets
provided.
See also
Other venndir internal:
assemble_venndir_label(),
assign_degree_groups(),
check_systemfonts_family(),
expand_range(),
get_venn_polygon_shapes(),
make_degrees_clockwise(),
match_list(),
print_color_df(),
render_venndir_footnotes(),
shrink_df(),
simple_ellipse(),
subset_systemfonts(),
venndir_label_style(),
venndir_to_df()
Examples
make_venn_combn_df(3);
#> set_1 set_2 set_3
#> set_1 1 0 0
#> set_2 0 1 0
#> set_3 0 0 1
#> set_1&set_2 1 1 0
#> set_1&set_3 1 0 1
#> set_2&set_3 0 1 1
#> set_1&set_2&set_3 1 1 1
make_venn_combn_df(3, include_zero=TRUE);
#> set_1 set_2 set_3
#> none 0 0 0
#> set_1 1 0 0
#> set_2 0 1 0
#> set_3 0 0 1
#> set_1&set_2 1 1 0
#> set_1&set_3 1 0 1
#> set_2&set_3 0 1 1
#> set_1&set_2&set_3 1 1 1
make_venn_combn_df(letters[1:3]);
#> a b c
#> a 1 0 0
#> b 0 1 0
#> c 0 0 1
#> a&b 1 1 0
#> a&c 1 0 1
#> b&c 0 1 1
#> a&b&c 1 1 1