Hi, I am revising a paper that I am a co-author of. The figures are plots generated from R but at the moment I do not have the R code that generates them. As this is time critical I would like to slightly abuse the list by asking whether anyone knows how to extract from MS Word into a stand-alone graphics file a plot that was pasted into Word from R (probably as a Windows Metafile, but possibly as a bitmap). I would be very grateful for help with this. Regards, Murray Jorgensen
Hi, I would also like to know how to do this with MS products alone. However, a nice tool to do this is wmf2eps (http://www.wmf2eps.de.vu/). You can paste windows vector graphics into wmf2eps, and it first saves it as EMF (enhanced metafile), before it creates EPS, which is what I use it for. Maybe your publisher will be even more happy if you supply EPS. Best regards, Johannes Ranke * maj at stats.waikato.ac.nz <maj at stats.waikato.ac.nz> [060629 08:30]:> Hi, > > I am revising a paper that I am a co-author of. The figures are plots > generated from R but at the moment I do not have the R code that generates > them. > > As this is time critical I would like to slightly abuse the list by asking > whether anyone knows how to extract from MS Word into a stand-alone > graphics file a plot that was pasted into Word from R (probably as a > Windows Metafile, but possibly as a bitmap). > > I would be very grateful for help with this. > > Regards, Murray Jorgensen > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html-- Dr. Johannes Ranke jranke at uni-bremen.de UFT Bremen, Leobenerstr. 1 +49 421 218 8971 D-28359 Bremen http://www.uft.uni-bremen.de/chemie/ranke
Click the graphic, press ctrl-C to copy it to the clipboard and then using ctrl-V paste it into mspaint or Xnview (free, find it via google) or other graphics program and then save it from there. Which program will work will depend on the format of the image. Another possibility is to save the Word file in HTML format. In Word, choose File | SaveAs and choose the Save As Type to be Web Page. That will create an HTML file plus it will create a folder with one file per image. On 6/29/06, maj at stats.waikato.ac.nz <maj at stats.waikato.ac.nz> wrote:> Hi, > > I am revising a paper that I am a co-author of. The figures are plots > generated from R but at the moment I do not have the R code that generates > them. > > As this is time critical I would like to slightly abuse the list by asking > whether anyone knows how to extract from MS Word into a stand-alone > graphics file a plot that was pasted into Word from R (probably as a > Windows Metafile, but possibly as a bitmap). > > I would be very grateful for help with this. > > Regards, Murray Jorgensen > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html >
Another way to do this is with OpenOffice (OO). Read the Word file into OO Writer. Cut the figure. Open OO Draw. Click Paste, and the figure appears in Draw. Save it as EPS, or whatever you like. This works for both EMF and WMF.> * maj at stats.waikato.ac.nz <maj at stats.waikato.ac.nz> [060629 08:30]: > > As this is time critical I would like to slightly abuse the list by asking > > whether anyone knows how to extract from MS Word into a stand-alone > > graphics file a plot that was pasted into Word from R (probably as a > > Windows Metafile, but possibly as a bitmap).-- Jonathan Baron, Professor of Psychology, University of Pennsylvania Home page: http://www.sas.upenn.edu/~baron Editor: Judgment and Decision Making (http://journal.sjdm.org)
On Thu, Jun 29, 2006 at 05:15:08PM +1200, maj at stats.waikato.ac.nz wrote:> I am revising a paper that I am a co-author of. The figures are plots > generated from R but at the moment I do not have the R code that generates > them. > > As this is time critical I would like to slightly abuse the list by asking > whether anyone knows how to extract from MS Word into a stand-alone > graphics file a plot that was pasted into Word from R (probably as a > Windows Metafile, but possibly as a bitmap).Open the doc file in OpenOffice, save in sxw format (openoffice's old native format), unpack the file with unzip and find the figure in the resulting directory. I'm not sure if and how this works with the new odt format used by openoffice now, but sxw will work. cu Philipp -- Dr. Philipp Pagel Tel. +49-8161-71 2131 Dept. of Genome Oriented Bioinformatics Fax. +49-8161-71 2186 Technical University of Munich Science Center Weihenstephan 85350 Freising, Germany and Institute for Bioinformatics / MIPS Tel. +49-89-3187 3675 GSF - National Research Center Fax. +49-89-3187 3585 for Environment and Health Ingolst?dter Landstrasse 1 85764 Neuherberg, Germany http://mips.gsf.de/staff/pagel