render.venn.diagram: Render (Print) a Previously-Computed Venn Diagram

Description Usage Arguments Value Examples

Description

A wrapper function for printing a grid-based image using grid::grid.draw().

Usage

1
2
render.venn.diagram(venn_diagram_created_with_VennDiagram_package,
  viewport_npc_width_height_for_images = 1)

Arguments

venn_diagram_created_with_VennDiagram_package

A grid-based diagram object. For example, a Venn diagram previously generated using veccompare::compare.vectors().

viewport_npc_width_height_for_images

The scale at which to print an image. If the image is cut off at its edges, for example, this can be set lower than 1.0.

Value

The function will not return a value; rather, it will print the image.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Create comparisons across 5 vectors, specifically creating all 4-way venn diagrams from them:
example <- veccompare::compare.vectors(
  veccompare::example.vectors.list[1:5],
  draw_venn_diagrams = TRUE,
  suppress_messages = TRUE,
  degrees_of_comparison_to_include = 4
)

# Get the first 4-way comparison that includes a diagram:
diagram <- veccompare::extract.compared.vectors(
  example,
  degrees_of_comparison = 4,
  elements_of_output = "venn_diagram"
)[[1]]$venn_diagram

# Print the diagram:
veccompare::render.venn.diagram(
  diagram,
  viewport_npc_width_height_for_images = .7
     # Scale the image down to 70%,
     # in case it otherwise gets cut off at the margins.
)

publicus/r-veccompare documentation built on May 10, 2019, 1:18 p.m.