Skip to contents

Venn Diagram

Usage

venn(
  data,
  var1,
  var1true,
  var2,
  var2true,
  var3,
  var3true,
  var4,
  var4true,
  upsetType = "upsetR",
  sortBy = "freq",
  minSize = 0,
  showAnnotations = FALSE
)

Arguments

data

The dataset as a data frame containing the variables for analysis.

var1

A string naming the primary variable from data for the diagram.

var1true

The level in var1 that represents the positive condition.

var2

A string naming the secondary variable from data used in the diagram.

var2true

The level in var2 that represents the positive condition.

var3

An optional variable from data to include in the diagram.

var3true

The level in var3 that represents the positive condition.

var4

An optional variable from data for additional overlap analysis.

var4true

The level in var4 that represents the positive condition.

upsetType

Choose between UpSetR (classic) or ComplexUpset (advanced with more features).

sortBy

How to sort the intersections in the UpSet plot.

minSize

Minimum size of intersections to display.

showAnnotations

Add statistical annotations to the ComplexUpset plot.

Value

A results object containing:

results$todoa html
results$summarya table
results$plotan image
results$plot2an image

Tables can be converted to data frames with asDF or as.data.frame. For example:

results$summary$asDF

as.data.frame(results$summary)