knitr::opts_chunk$set(collapse = TRUE, comment = "#>") # Skip evaluation of all chunks on CRAN's auto-check farm to fit the # 10-minute build budget. Locally, on CI, and under devtools::check(), # NOT_CRAN=true and all chunks evaluate normally. The vignette source # (which CRAN users see in browseVignettes() / vignette()) is unchanged. NOT_CRAN <- identical(tolower(Sys.getenv("NOT_CRAN")), "true") knitr::opts_chunk$set(eval = NOT_CRAN)
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).Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.