[R] Export a plot/figure to excel or word?

Steve Taylor steve.taylor at aut.ac.nz
Wed Mar 14 21:00:59 CET 2012

I have found the TIF format (with lossless compression) most suitable for inclusion in Word documents.  

Here's my function for producing a tif plot...

word.tif <- function(filename="Word_Figure.tif", zoom=5, res=96*zoom, width=17, height=10, pointsize=10, bg='white') {
  if (!filename %like% "[.]ti[f]+$") filename = paste(filename,"tif",sep='.')
  tiff(filename=filename, res=res, width=width, height=height, units='cm', pointsize=pointsize, bg=bg, compression="lzw")

# usage...
word.tif('random normals', width=10, height=10)  # centimetres

-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Aurelie Cosandey Godin
Sent: Thursday, 15 March 2012 8:50a
To: r-help at r-project.org
Subject: [R] Export a plot/figure to excel or word?

Hi all,

I have created forest plots using the package "meta" that I submitted as pdf for publication. I just received an email from the editor asking me if I could send these files in an Excel or MS Word format such that they can treat them as tables with box plots.

I am not sure if I can do this... Is this possible? I've tried the capture.output command, but I get a blank MS Word document.

Thank you very much in advance,


Aurelie Cosandey-Godin
Ph.D. student, Department of Biology
Industrial Graduate Fellow, WWF-Canada

Dalhousie University | Biology Dept. | 1459 Oxford Street |Halifax, NS | Canada B3H 4R2  
Phone: 1-902-494-2146 | cell: 1-902-412-3404 |Fax: 1-902-494-3736 
Email: godina at dal.ca | Skype: aureliegodinco | Web: wormlab.biology.dal.ca
Want to learn more about sharks in Atlantic Canada? Visit ShARCC! www.atlanticsharks.org

	[[alternative HTML version deleted]]

R-help at r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list