Description Usage Arguments Details Value Examples
View source: R/analysis_functions.R
Calculate sizes of unions and intersections between each pair of sets
1 | getSetIntersections(df, setNames, idName)
|
df |
A data frame indicating set membership |
setNames |
A character vector of set names |
idName |
A string specifying name of ID variable for each item |
The input data frame should contain a row for each item and a binary variable
for each set indicating the membership of each item. The setNames
input should correspond to the binary indicator columns in the data frame.
A data frame with variables:
set1 and set2 pair of sets
Ninter and Nunion number of elements in
the intersection and union of the pair of sets
N1 and N2 number of items in each set
prop1 and prop2 proportion of items in
each set that are also members of the other set
(prop1 = Ninter / N1)
prop proportion of items from either set that
are members of both sets (prop = Ninter / Nunion)
.pred predictions assuming marginal independence of sets
.error difference between predictions and observations
.relError error relative to observations
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.