qvenn: qvenn - Venn Diagram

View source: R/ggExpress.R

qvennR Documentation

qvenn - Venn Diagram

Description

Draw and save a Venn Diagram using the ggVennDiagram package.

Usage

qvenn(
  list,
  also.pdf = FALSE,
  save.obj = FALSE,
  plotname = FixPlotName(substitute(list)),
  suffix = NULL,
  subtitle = paste(length(unique(unlist(list))), "elements in total"),
  caption = parseParamStringWNames(sapply(list, length)),
  caption2 = NULL,
  filename = NULL,
  ext = MarkdownHelpers::ww.set.file.extension(default = "png", also_pdf = also.pdf),
  plot = TRUE,
  save = TRUE,
  mdlink = MarkdownHelpers::unless.specified("b.mdlink", def = FALSE),
  col.min = "white",
  col.max = "red",
  hide.legend = FALSE,
  x_exp = 0.2,
  w = 8,
  h = 0.75 * w,
  ...
)

Arguments

list

The variable to plot.

also.pdf

Save plot in both png and pdf formats.

save.obj

Save the ggplot object to a file. Default: FALSE.

plotname

The title of the plot and the name of the file (unless specified in filename).

suffix

Optional suffix added to the filename. Default is NULL.

subtitle

The subtitle of the plot. Default: paste (length(unique(unlist(list))), 'elements in total')

caption

Optional text added to bottom right corner of the plot. Default = List element lengths parsed.

caption2

Optional text added to bottom right corner of the plot. Default = NULL.

filename

Manually provided filename (optional). Default: parse from plotname,

ext

File extension (.pdf / .png).

plot

Display the plot.

save

Save the plot into a file.

mdlink

Insert a .pdf and a .png image link in the markdown report, set by "path_of_report".

col.min

Color scale minimum, default: white

col.max

Color scale maximum, default: red

hide.legend

hide legend

x_exp

Expand axis to show long set labels. Default: 0.2.

w

Width of the plot.

h

Height of the plot. Default: h = w * 0.75.

...

Pass any other parameter of the corresponding plotting function(most of them should work).

Examples

LetterSets <- list("One" = LETTERS[1:7], "Two" = LETTERS[3:12])
qvenn(LetterSets)


vertesy/ggExpress documentation built on Nov. 24, 2024, 10:44 p.m.