pairwise_intersections | R Documentation |
This function takes in a list of vectors and performs pairwise set intersections for all unique pairs of vectors in the list.
pairwise_intersections(x, universe_size = NULL)
x |
List of vectors to perform intersections on |
universe_size |
Size of the universe of features each set was drawn from. default NULL. If supplied then a fisher's exact test is performed to assess the significance of the overlap. Note, the same universe size is used for all pairwise comparisons. |
data.table
a data.table containing columns for the sets being compared, a list column which contains the actual values in the intersection, a column with the intersection size, and a column with the Jaccard index, and optionally a P-Value column containing the p-value from a fisher's exact test if universe_size is given.
l <- list(
Set1 = c("A", "B", "C"),
Set2 = c("B", "C", "D"),
Set3 = c("X", "Y", "Z"),
Set4 = LETTERS
)
pairwise_intersections(l)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.