getSetIntersections: Calculate sizes of intersections between sets

Description Usage Arguments Details Value Examples

View source: R/analysis_functions.R

Description

Calculate sizes of unions and intersections between each pair of sets

Usage

1

Arguments

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

Details

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.

Value

A data frame with variables:

Examples

1
2
3
4
5
6
# Define set names
data("movieSets")
setNames <- colnames(movieSets[,-c(1:8)])

# Calculate set sizes
getSetIntersections(movieSets, setNames, "movieId")

natbprice/radsets documentation built on Feb. 29, 2020, 5:21 p.m.