[R] append output to an existing file

Yves Gauvreau cyg at sympatico.ca
Thu Mar 1 13:16:00 CET 2001


Hi,

If output.doc is a real MS Word formatted file and not just an ASCII file
saved with the .doc extension, then using ">>" will effectively append
whatever text is outputted to the file output.doc but Word will never show
it to you. I tried it and I see the appended text in notepad at the end of
the file as it should but Word doesn't display it.

If you absolutely need to add some text to a Word document there are many
ways you can do that but it involves either starting Word or create a Word
document object. Now, doing this from R or via R all I can think of is using
an ActiveX aware scripting language such as Perl, VB Script or Java Script.

If you need help writing the script I could give a hand but I'm no expert at
this and I know more about VB script then the others.

Yves Gauvreau


----- Original Message -----
From: "Uwe Ligges" <ligges at statistik.uni-dortmund.de>
To: "Yu-Ling Wu" <yuling5 at yahoo.com>
Cc: "R-Help" <r-help at stat.math.ethz.ch>
Sent: Thursday, March 01, 2001 2:35 AM
Subject: Re: [R] append output to an existing file


>
>
> Yu-Ling Wu wrote:
> >
> > Hi,
> >
> > I have a Word file "output.doc".
> > Now I run "rterm --slave < script.r > output.doc".
> > It will overwrite all the data in "output.doc".
>
> Try
> rterm --slave < script.r >> output.doc
>
> Uwe
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-.-.-
> 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
>
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
_._

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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