dev.new.file | R Documentation |
Open a new device for plotting and allow some settings
dev.new.file(device = "dev", return.device = TRUE, filename = NULL, ...)
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). |
Simon Frey
d <- dev.new.file(device = "png",filename = "C:/TEMP/test")
plot(1)
if(d %in% c("png","pdf","svg")) dev.off()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.