pdf_safely: Safely Export as PDF Without Overwriting the File

pdf_safelyR Documentation

Safely Export as PDF Without Overwriting the File

Description

Wraps pdf. If the file already exists, it will not be overwritten. A message will be printed indicating whether the file was successfully written or if it already existed.

Usage

pdf_safely(file = stop("'file' must be specified"), ...)

Arguments

file

Path/file name to for PDF file. Required.

...

Optional. Passed on to pdf.

Value

None.

Examples

## Not run: 
pdf_safely(file = "graphs.pdf")
# ... code that generates plots ...
dev.off()

## End(Not run)

stopsack/khsmisc documentation built on Sept. 22, 2023, 12:26 p.m.