2

Is there a way to export a graph made in R in a way that keynote can read the objects of the graph as separate objects and not like a single image?

Usually I export graphs in R as pdf but then Keynote import them as a single object.

danilinares
  • 1,172
  • 1
  • 9
  • 28
  • How about exporting graphs in separate files, and then read each file in Keynote? – kohske Oct 07 '11 at 23:34
  • I think not in the way you wish. An R graph can be only exported in (vector/raster) image, which cannot be altered in keynote/powerpoint etc. – daroczig Oct 08 '11 at 00:36
  • 2
    try exporting in svg and converting it to keynote shapes http://www.christianholz.net/svg2keynote_svg_to_keynote.html – baptiste Oct 08 '11 at 02:43
  • @baptiste, why don't you make your comment an answer? – Ben Bolker Oct 08 '11 at 14:32
  • svg2keynote didn't work for me (all the plot elements come out as black-filled boxes) using either grDevices::svg() or ggsave(). I've got the '08 release of Keynote, so that might be the root of the problem. – kmm Oct 08 '11 at 16:14

2 Answers2

1

As suggested in the comments: try exporting in svg and converting it to keynote shapes. Several tools exist, for instance http://christianholz.net/svg2keynote_svg_to_keynote.html (or through illustrator) and http://mcb.berkeley.edu/labs/zusman/dave/svg2key/

Note: I have not been able to test this idea successfully, they seem to depend on the version of OSX/Keynote)

baptiste
  • 75,767
  • 19
  • 198
  • 294
0

It's not clear whether you;

a) Want to put one object into another application, and edit it, In which case, try saving it as an svg object that can then be edited in a suitable application like Inkscape (see Create Editable plots from R)

b) Want to create a series of objects and then put them into another application individually, in which case I would either i. use at Sweave which can create a pdf document, but will also create an individual pdf/eps file for each object or ii. Look at odfweave which works like sweave but can create an OpenDocument .odt that could be opened in LibreOffice.

Community
  • 1
  • 1
PaulHurleyuk
  • 8,009
  • 15
  • 54
  • 78