Learn R Programming

ribiosPlot (version 1.3.0)

idev: Interative dev.print and pdf print

Description

Execute dev.print only if R session is interactive.

Usage

idev(...)

ipdf(file, ...)

Value

Side effect used.

Arguments

...

Parameters passed to dev.print

file

PDF file name

Author

Jitao David Zhang <jitao_david.zhang@roche.com>

Details

ipdf is a shortcut in case PDF is used as the device, with the twist that useDingbats is set to FALSE by default. See NOTE.

dev.print will make a R-script fail if the session is not interactive (e.g. when the script is excuted with the -f option from R command line). Function idev checks first whether the session is interative, and executes dev.print only if the session is interactive.

A commonly used shortcut is ipdf, which prints the current device to a PDF file.

See Also

Examples

Run this code

tmfile <- tempfile()
plot(1:15, type="h")
idev(png, tmfile,width=600, height=800)
ipdf(tmfile)

Run the code above in your browser using DataLab