Re: [R] How to dump plots as bas64 strings?

2009-03-05 Thread Gabor Grothendieck
On Wed, Mar 4, 2009 at 9:17 AM, Patrick Meyer pater...@gmail.com wrote: Hello My question might sound awkward, but I am looking for a way to somehow convert a plot in R into a base64 string. Here's an idea, but it is not at all satisfying. 1. write the plot to the harddisk:

Re: [R] How to dump plots as bas64 strings?

2009-03-05 Thread Patrick Meyer
Here's the solution I'm using now, but it is not very clean: png(out.png) plot(c(1,2,3)) dev.off() system(base64 -w0 out.png out.base64) b64txt - readLines(file(out.base64,rt)) It would be nice to have an internal solution, even if this exactly does what I want. Patrick Gabor Grothendieck

Re: [R] How to dump plots as bas64 strings?

2009-03-05 Thread Duncan Temple Lang
Patrick Meyer wrote: Here's the solution I'm using now, but it is not very clean: png(out.png) plot(c(1,2,3)) dev.off() system(base64 -w0 out.png out.base64) b64txt - readLines(file(out.base64,rt)) It would be nice to have an internal solution, even if this exactly does what I want. I'm

Re: [R] How to dump plots as bas64 strings?

2009-03-05 Thread Gabor Grothendieck
On Thu, Mar 5, 2009 at 1:27 PM, Duncan Temple Lang dun...@wald.ucdavis.edu wrote: Patrick Meyer wrote: Here's the solution I'm using now, but it is not very clean: png(out.png) plot(c(1,2,3)) dev.off() system(base64 -w0 out.png out.base64) b64txt - readLines(file(out.base64,rt)) It

[R] How to dump plots as bas64 strings?

2009-03-04 Thread Patrick Meyer
Hello My question might sound awkward, but I am looking for a way to somehow convert a plot in R into a base64 string. Here's an idea, but it is not at all satisfying. 1. write the plot to the harddisk: --- png(toto.png) plot(c(1,2,3)) dev.off()