问题
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.
回答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)
回答2:
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.
来源:https://stackoverflow.com/questions/7693707/r-export-a-file-to-keynote