open_dev: Open a device from the filename extension

Description Usage Arguments Value Examples

Description

Open a device from the filename extension. This function allows you to simply open a device by using the filename. So that if you have .PNG as the extension it opens a PNG, etc.

Usage

1
open_dev(filename, type = "cairo", ...)

Arguments

filename

filename to open

type

Type of device to open, i.e. "cairo", (see png)

...

arguments to be passed to device

Value

NULL, with deviced opened

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
fname = tempfile(fileext= ".png")
open_dev(fname)
plot(0, 0)
dev.off()
# view(fname)
# view(fname, viewer="open")
fname = tempfile(fileext= ".pdf")
open_dev(fname,height=7, width=7)
plot(0, 0)
dev.off()
# view(fname)

muschellij2/smallpdf documentation built on May 23, 2019, 9:55 a.m.