Venn: Construct intersections of sets

Description Usage Arguments Value Author(s) Examples

Description

Given a collection of Sets, Venn will compute all possible combinations of intersections and return an object of class Venn, storing the combinations as well as the number of elements in each intersection (the 'weights'). It will also accept a specification of the weights directly, or simply of the number of sets desired.

Usage

1
2
3
Venn(Sets, Weight, SetNames, numberOfSets)
Weights(object)
Weights(object) <- value

Arguments

Sets

A list, each element of which can be a list defining the members of a Set

Weight

A named vector of weights to associate with each possible combination of Set intersections. Ignored if Sets is present.

SetNames

A character vector of names for each Set. Ignored if Sets present and has names

numberOfSets

An integer for the number of Sets. Ignored if Sets or SetNames present.

object

An object of class Venn

value

An object like Weight

Value

An object of class Venn

Author(s)

Jonathan Swinton (jonathan@swintons.net)

Examples

1
2
3
4
5
6
7
Venn(n=3)
data(StemCell)
w <- Venn(Sets=StemCell[1:2])
Weights(w)
# nb order of intersection subsets not guaranteed
Weights(w) <- 1:4
Venn(SetNames=letters[1:5])

Vennerable documentation built on May 2, 2019, 5:49 p.m.