to_pdf_report() produces a multi-page US-Letter-landscape PDF combining the venn diagram, UpSet plot, statistics tables, network view, and a methodology page — equivalent to the web tool’s “Generate Report” button.
library(vennDiagramLab)
result <- analyze(load_sample("dataset_real_cancer_drivers_4"))Save to a temporary file (vignettes shouldn’t write into the package directory):
out <- tempfile(fileext = ".pdf")
to_pdf_report(result, path = out, title = "Cancer driver overlap")
file.exists(out)
file.size(out) # bytes(The chunk above is gated on R >= 4.6 because the report embeds an UpSet panel via ComplexUpset, whose CRAN release (1.3.3) is incompatible with ggplot2 >= 4.0 on older R. See ?vennDiagramLab::to_pdf_report for context and workarounds.)
By default, every report has 5 page types:
Pages 4 (network) and 5 (about) can be turned off:
to_pdf_report(result, "venn_only.pdf",
include_network = FALSE,
include_about = FALSE)vignette("v02_real_cancer_drivers") — see the analysis that feeds the report.vignette("v08_custom_styling_and_export") — multi-format export beyond PDF (SVG, PNG).