[R] export graph to Word/Excel
Prof Brian D Ripley
ripley at stats.ox.ac.uk
Wed Mar 7 08:39:47 CET 2001
On Tue, 6 Mar 2001, Yu-Ling Wu wrote:
> Hi,
>
> I have a set of script like this:
>
> ----------------------
> summary(data)
> plot(time, users, type="o", xlab ="Time", ylab="Number
> of Users")
> ----------------------
>
> I type "rterm --slave < script.r > output.doc" and the
> graphic doesn't
> actually in the output.doc file. How to make the
> graphic embedded in Word
> or Excel file?
You need to write to a specified graphics device. That usage I believe
just pops up a graphics window and shuts it again.
I would think you want
win.metafile("plot1.emf", width=??, height=??)
before doing any plotting. Then you can include plot1.emf into a Word
etc document.
Note that the production of metafiles works much better in 1.2.2 than
before.
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list