make_venn_test | R Documentation |
Generate test sets for venndir
make_venn_test(
n_items = 1e+06,
n_sets = 4,
do_signed = FALSE,
concordance = 0.5,
min_size = ceiling(n_items/50),
max_size = ceiling(n_items/2),
items = NULL,
sizes = NULL,
seed = 123,
...
)
n_items |
|
n_sets |
|
do_signed |
|
concordance |
|
min_size |
|
max_size |
|
items |
|
sizes |
|
seed |
|
... |
additional arguments are ignored. |
This function generates data to use as test input to
Venn diagram functions. It can generate sets of items,
or signed sets (integer values -1
, 1
) named by
item.
This function defines a range of set sizes, using min_size
and max_size
, with roughly square-root sequence of sizes
between these two extremes.
Note that the universe size represents the total available
items, but not necessarily the total number of items
represented by the sets. For example, if n_items=1000000
,
max_size=500
and n_sets=3
then the maximum number of
items actually represented is 1500
.
The universe can be defined using optional argument items
,
which takes priority over n_items
.
The specific size of each set can be defined with optional
argument sizes
, which takes priority over min_size
, and
max_size
.
list
of items, either as a list of item vectors,
or when do_signed=TRUE
the list of vectors, where vector
names contain the items, and vector values are signed values
from c(-1, 1)
.
Other venndir utility:
curate_venn_labels()
,
expand_range()
,
make_color_contrast()
,
make_venn_combn_df()
,
match_list()
,
nudge_venndir_label()
,
print_color_df()
,
shrink_df()
,
three_point_angle()
,
venndir_legender()
,
venndir_to_df()
## basic setlist without signed direction
setlist <- make_venn_test(n_items=100,
n_sets=3,
min_size=5,
max_size=25)
set_im <- list2im_opt(setlist);
table(jamba::pasteByRow(as.matrix(set_im)*1))
## basic setlist with signed direction
setlist <- make_venn_test(n_items=100,
n_sets=3,
do_signed=TRUE)
jamba::sdim(setlist);
## some example overlap summaries
sv1 <- signed_overlaps(setlist=setlist, "overlap")
sv1
## Familiar named overlap counts
jamba::nameVector(sv1[,c("count","sets")])
## directional count table for each combination
sv2 <- signed_overlaps(setlist=setlist, "each")
sv2
## directional count table for agreement or mixed
sv3 <- signed_overlaps(setlist=setlist, "agreement")
sv3
## signed incidence matrix
imv <- list2im_value(setlist)
dim(imv)
head(imv)
## text venn diagram
textvenn(setlist, overlap_type="overlap")
## text venn diagram with signed direction
textvenn(setlist, overlap_type="each")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.