idev | R Documentation |
Execute dev.print only if R session is interactive.
idev(...)
ipdf(file, ...)
... |
Parameters passed to |
file |
PDF file name |
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.
Side effect used.
useDingbats
is set to FALSE
in ipdf
. Setting the
option to TRUE
causes problem in importing the PDF to Inkscape, a
vector-based figure modifying software. Though the option may reduces
smaller and (according to the R manual) better output, we have noticed no
difference.
Jitao David Zhang <jitao_david.zhang@roche.com>
dev.print
, pdf
tmfile <- tempfile()
plot(1:15, type="h")
idev(png, tmfile,width=600, height=800)
ipdf(tmfile)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.