[Rd] serialized plot object (for a certain device)

From: Tobias Verbeke <tobias.verbeke_at_gmail.com>
Date: Sat, 01 Sep 2007 17:34:42 +0200


Dear list,

Using serialize it is possible to save
the binary string representing an R
object to a raw R vector.

## adapted from ?serialize
x <- serialize(list(1,2,3), NULL)
x

I am looking for a way to capture
the binary string that in normal
use of graphics devices will be
written to (most commonly) a file
connection.

jpeg(file = "test.jpg")

   plot(1:10)
dev.off()

In other words, is there a way of
capturing the binary `jpeg string'
representing the plot(1:10) graph,
e.g. into a raw vector ?

Many thanks in advance,
Tobias

-- 

Tobias Verbeke - Consultant
Business & Decision Benelux
Rue de la révolution 8
1000 Brussels - BELGIUM

+32 499 36 33 15
tobias.verbeke_at_businessdecision.com

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Sat 01 Sep 2007 - 15:37:26 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 01 Sep 2007 - 17:40:19 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.