dir.gg | R Documentation |
Concatenates a path, filename, and file extension into an output path, then writes a plot to the output path. Any folders in the path that do not exist are created.
dir.gg(x, filename, path = ".", ext = "pdf", ..., append.date = T)
x |
A plot object. |
filename |
The output file name. |
path |
The path to the output file. |
ext |
The file extension. |
... |
Additional arguments to |
append.date |
Whether to write the output to a directory with today's date. |
dir.img
, ggplot2::ggsave
library(ggplot2)
x <- ggplot2(iris)
dir.gg(x,"example",path="path/to")
plot(1:5,1:5)
dev.off()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.