diff --git a/NAMESPACE b/NAMESPACE index 0ab6cf1..9279be8 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -23,7 +23,7 @@ export( calculate.overlap, get.venn.partitions ) -importFrom("grDevices", "dev.off", "png", "svg", "tiff") +importFrom("grDevices", "dev.off", "png", "svg", "tiff", "pdf") importFrom("stats", "aggregate", "setNames", "phyper") importFrom("utils", "capture.output", "combn") import(grid, diff --git a/R/venn.diagram.R b/R/venn.diagram.R index b31c0a1..4fbba07 100644 --- a/R/venn.diagram.R +++ b/R/venn.diagram.R @@ -485,6 +485,14 @@ stop('Invalid size of input object'); ); } + # PDF image type specified + else if('pdf' == imagetype) { + pdf( + file = filename, + height = height, + width = width + ); + } # Invalid imagetype specified else { flog.error("You have misspelled your 'imagetype', please try again",name="VennDiagramLogger") diff --git a/man/venn.diagram.Rd b/man/venn.diagram.Rd index a3fdbd1..bb611e7 100644 --- a/man/venn.diagram.Rd +++ b/man/venn.diagram.Rd @@ -24,7 +24,7 @@ venn.diagram(x, filename, height = 3000, width = 3000, resolution = \item{height}{Integer giving the height of the output figure in units} \item{width}{Integer giving the width of the output figure in units} \item{resolution}{Resolution of the final figure in DPI} - \item{imagetype}{Specification of the image format (e.g. tiff, png or svg)} + \item{imagetype}{Specification of the image format: tiff, png, svg, pdf} \item{units}{Size-units to use for the final figure} \item{compression}{What compression algorithm should be applied to the final tiff} \item{na}{Missing value handling method: "none", "stop", "remove"}