dev.new.file: Open a new device for plotting

View source: R/functions.r

dev.new.fileR Documentation

Open a new device for plotting

Description

Open a new device for plotting and allow some settings

Usage

dev.new.file(device = "dev", return.device = TRUE, filename = NULL, ...)

Arguments

device

any string of "dev","png","pdf", or "svg"

return.device

logical. should the type of device be returned?

filename

string. Where should the plot be saved? If no extention is given, it will be added according to the type of the device.

...

additional arguments passed on to the dev fuction (e.g. dev.new, or png).

Author(s)

Simon Frey

Examples

    d <- dev.new.file(device = "png",filename = "C:/TEMP/test")
    plot(1)
    if(d %in% c("png","pdf","svg")) dev.off()


freysimon/TigeR documentation built on April 18, 2024, 4:57 p.m.