intersectDiagram(x,pct=FALSE,show.nulls=FALSE,xnames=NULL,sep="+",
mar=c(0,0,3,0),main="Intersection Diagram",cex=1,col=NULL,
minspacing=NA,all.intersections=FALSE,include=NULL)
Important - If the all.intersections argument is TRUE, all intersections will be displayed, whether empty or not (see the example). This is mostly for demonstration purposes, and if the number of sets is large, is likely to produce a very messy diagram. Similarly, sets with large numbers of intersections that are populated will require very large displays to be readable, even if there are small numbers in the intersections. If you would like to see this in action, pass the data frame setdf in the categoryReshape example to intersectDiagram with all.intersections TRUE.
intersectDiagram does not attempt to display the set intersections as a pattern of overlapping geometric figures, but rather the relative numbers of objects sharing each intersection. More than three intersecting sets generally produce a complex and difficult to interpret Venn diagram, and this provides an alternative way to display the size of intersections between larger numbers of sets.
intersectDiagram now allows the user to display only part of the set intersections, which is useful for analyzing very complex intersections. This is controlled by the include argument. This defaults to all sets or attributes when include=NULL. If one or more of the labels of the sets or attributes is passed, only the intersections containing those labels will be displayed. See examples 2 and 3 below. Each set (attribute) is assigned a color if col is not NA. rainbow is called if col is NULL, otherwise the colors passed are used. For each intersection, the colors representing the sets intersecting are included in the rectangle. The strings displayed on each rectangle are taken from the argument xnames unless that is NULL, then the names of the intersectList object passed as x or returned from the call to makeIntersectList. If a matrix or data frame of set membership indicators is passed as x, it will be passed to makeIntersectList for conversion. Each column must represent a set, and the values in the columns must be 0 or 1, or FALSE or TRUE. Similarly, if a matrix or data frame in which the first column is object identifiers and the second column is attributes, this will be passed to makeIntersectList.
The spacing between the largest rectangles is controlled by minspacing.
minspacing is in units of object counts and defaults to 0.1 times the
largest number of objects in an intersection. When the number of objects in
different intersections at a given level varies widely, the labels of
intersections with few objects may overlap if they are wide relative to the
rectangle representing the number of objects. This can be corrected by
passing a minspacing argument that will increase the space between
rectangles and/or decreasing the character size of the labels. If the labels
for each set are relatively long, setting namesep="