I found the very convenient dev.copy2pdf command to copy the window I am viewing into a pdf file like so:
plot(rnorm(1000))
dev.copy2pdf(file="myfile.pdf")
And my question: is there an equivalent dev.copy2svg for the same effect but that writes out to svg format?
In fact, dev.copy2pdf is a convenient wrapper around the generic dev.copy function. You can use this one to copy to an SVG device, like this :
plot(rnorm(1000))
dev.copy(svg, file="myfile.svg")
dev.off()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With