Is there a way to have an R Device (postscript would be great) write the output into a variable instead of a file?
For example I know this:
postscript(file="|cat")
plot(1:10)
dev.off()
Will send the postscript text to STDOUT. How can I get that text into a variable within R?
I’ve had success in getting the Binary of a plot into an R variable as a string. Its got some read/write overhead. In the snippet below, R saves the plot as a temp file and reads it back in.
Maybe this is helpful to you.