Re: [R] Output and Word

2006-07-19 Thread David Hajage
thank you Greg Snow for this information !

But I have this message :

 odfWeave(c:/simple.odt, c:/essai.odt)
  Setting wd
  Copying  c:/simple.odt
  Decompressing ODF file using unzip -o
C:\DOCUME~1\Maud\LOCALS~1\Temp\RtmpF0hdqb/simple.odt
Erreur dans odfWeave(c:/simple.odt, c:/essai.odt) :
Error unzipping file
De plus : Warning message:
unzip introuvable

R says that it doesn't find unzip... What is this program ?

2006/7/18, Greg Snow [EMAIL PROTECTED]:

 Others have suggested using R2HTML (which is a good option).

 Another option is to use Sweave and specifically the new odfWeave
 package for R.  This works on OpenOffice files rather than word files
 (but OpenOffice  http://www.openoffice.org/ can inport and export word
 documents).

 The basic idea is to write your report in OpenOffice (or LaTeX or HTML),
 but anywhere that you want statisticial output (graphs, tables) you
 include instead the R code to produce the table, graph, or whatever.
 Run this file through R (using Sweave or odfWeave) and the resulting
 file has replaced all the code segments with their output.

 The documentation with odfWeave has examples.

 Hope this helps,

 --
 Gregory (Greg) L. Snow Ph.D.
 Statistical Data Center
 Intermountain Healthcare
 [EMAIL PROTECTED]
 (801) 408-8111


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of sharon snowdon
 Sent: Monday, July 17, 2006 2:36 PM
 To: r-help@stat.math.ethz.ch
 Subject: [R] Output and Word

 Hi

 I have just started to have a look at R. I have used most stats software
 packages and can use perl, visual basic etc. I am interested in how well
 it handles lots of output e.g. tables or charts. How would you get lots
 of output most easily and quickly into a Word document?

 Sharon Snowdon



 
 -






 --





 __
 R-help@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

 __
 R-help@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
 and provide commented, minimal, self-contained, reproducible code.




-- 
David

[[alternative HTML version deleted]]

__
R-help@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
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Output and Word

2006-07-19 Thread Prof Brian Ripley
On Wed, 19 Jul 2006, David Hajage wrote:

 thank you Greg Snow for this information !
 
 But I have this message :
 
  odfWeave(c:/simple.odt, c:/essai.odt)
   Setting wd
   Copying  c:/simple.odt
   Decompressing ODF file using unzip -o
 C:\DOCUME~1\Maud\LOCALS~1\Temp\RtmpF0hdqb/simple.odt
 Erreur dans odfWeave(c:/simple.odt, c:/essai.odt) :
 Error unzipping file
 De plus : Warning message:
 unzip introuvable
 
 R says that it doesn't find unzip... What is this program ?

It is in the Rtools.zip bundle used to build source packages for R under 
Windows (your unstated OS, it seems).

However, you should take this up with the package maintainer, as R has the 
capability to unzip files builtin (utils::zip.unpack) on Windows.

 
 2006/7/18, Greg Snow [EMAIL PROTECTED]:
 
  Others have suggested using R2HTML (which is a good option).
 
  Another option is to use Sweave and specifically the new odfWeave
  package for R.  This works on OpenOffice files rather than word files
  (but OpenOffice  http://www.openoffice.org/ can inport and export word
  documents).
 
  The basic idea is to write your report in OpenOffice (or LaTeX or HTML),
  but anywhere that you want statisticial output (graphs, tables) you
  include instead the R code to produce the table, graph, or whatever.
  Run this file through R (using Sweave or odfWeave) and the resulting
  file has replaced all the code segments with their output.
 
  The documentation with odfWeave has examples.
 
  Hope this helps,
 
  --
  Gregory (Greg) L. Snow Ph.D.
  Statistical Data Center
  Intermountain Healthcare
  [EMAIL PROTECTED]
  (801) 408-8111
 
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf Of sharon snowdon
  Sent: Monday, July 17, 2006 2:36 PM
  To: r-help@stat.math.ethz.ch
  Subject: [R] Output and Word
 
  Hi
 
  I have just started to have a look at R. I have used most stats software
  packages and can use perl, visual basic etc. I am interested in how well
  it handles lots of output e.g. tables or charts. How would you get lots
  of output most easily and quickly into a Word document?
 
  Sharon Snowdon
 
 
 
  
  -
 
 
 
 
 
 
  --
 
 
 
 
 
  __
  R-help@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
 
  __
  R-help@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
  and provide commented, minimal, self-contained, reproducible code.
 
 
 
 
 

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
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 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
R-help@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
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Output and Word

2006-07-18 Thread mail
Hi, 

you might try to use the R2HTML package and then import the html files into 
word. please see. http://cran.r-project.org/doc/Rnews/Rnews_2003-3.pdf

Another way: use sweave for tex/latex output and transform it to rtf.

Friedrich Schuster

--- 
Your post was: 
sharon snowdon sharonsnowdon at fastmail.fm 
Hi

I have just started to have a look at R. I have used most stats software
packages and can use perl, visual basic etc. I am interested in how well
it handles lots of output e.g. tables or charts. How would you get lots
of output most easily and quickly into a Word document?

Sharon Snowdon

__
R-help@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
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Output and Word

2006-07-18 Thread Gabor Grothendieck
If its text that you want included in a larger Word document
you can create a text or HTML file from R and then when inserting it
into Word insert it as a link rather than copying it in.

output a file from R
In Word
   Insert | File
   browse to the file so its name appears in the File name box
   click on the down arrow to the right of the Insert button
 and choose Insert as Link

If you regenerate the file in the future your Word document gets
automatically uipdated.

Another possibility is either the rcom and RDCOMClient packages
which allow one to control Word from R by treating Word as a COM object.
This allows detailed control of Word but is more work.  e.g. Here
we create a Word document from scratch.  Note that you must
be running Windows and have Word on the machine where you do
this:

library(RDCOMClient)
ow - COMCreate(Word.Application)
ow[[Visible]] - TRUE  # optional
od - ow[[Documents]]$Add()

od[[PageSetup]][[LeftMargin]] - 20
od[[PageSetup]][[TopMargin]] - 20

od[[Content]][[Font]][[Size]] - 11
od[[Content]][[Text]] - Hello World

od$SaveAs(\\mydoc.doc)
ow$Quit()


On 7/17/06, sharon snowdon [EMAIL PROTECTED] wrote:
 Hi

 I have just started to have a look at R. I have used most stats software
 packages and can use perl, visual basic etc. I am interested in how well
 it handles lots of output e.g. tables or charts. How would you get lots
 of output most easily and quickly into a Word document?

 Sharon Snowdon



 
 -
 FIGHT BACK AGAINST SPAM!
 Download Spam Inspector, the Award Winning Anti-Spam Filter
 http://mail.giantcompany.com



 --



 7/14/2006

 __
 R-help@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


__
R-help@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
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Output and Word

2006-07-18 Thread Neuro LeSuperHéros
R can handle as many graphs/table as you ask it to.

I don't know what you're trying to do, but I generate lots of graphs using 
loops and generating filenames on the spot.

See FAQ 7.34 to see how it's done.
http://cran.r-project.org/doc/FAQ/R-FAQ.html#How-can-I-save-the-result-of-each-iteration-in-a-loop-into-a-separate-file_003f

For graphs, save the graphs as something windows can recognize (jpeg, png, 
emf, wmf...) and in Word, you can easily import all the graphs in a 
directory by doing Insert/Picture/From File and shift-click all the graphs 
you want.  Word will import them all.

For tables, it really depends on what you want because usually there is 
formatting involved.  Personnaly, if I had to produce several tables to be 
imported in Word, I would use the R2HTML library in a loop (as mentionned 
above) and import the multiple html files using Insert/File (and 
shift-click) in Word.

Neuro

From: sharon snowdon [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch
Subject: [R] Output and Word
Date: Tue, 18 Jul 2006 06:35:38 +1000

Hi

I have just started to have a look at R. I have used most stats software
packages and can use perl, visual basic etc. I am interested in how well
it handles lots of output e.g. tables or charts. How would you get lots
of output most easily and quickly into a Word document?

Sharon Snowdon




-
FIGHT BACK AGAINST SPAM!
Download Spam Inspector, the Award Winning Anti-Spam Filter
http://mail.giantcompany.com



--



7/14/2006

__
R-help@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



From: sharon snowdon [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch
Subject: [R] Output and Word
Date: Tue, 18 Jul 2006 06:35:38 +1000

Hi

I have just started to have a look at R. I have used most stats software
packages and can use perl, visual basic etc. I am interested in how well
it handles lots of output e.g. tables or charts. How would you get lots
of output most easily and quickly into a Word document?

Sharon Snowdon




-
FIGHT BACK AGAINST SPAM!
Download Spam Inspector, the Award Winning Anti-Spam Filter
http://mail.giantcompany.com



--



7/14/2006

__
R-help@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

__
R-help@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
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Output and Word

2006-07-18 Thread Greg Snow
Others have suggested using R2HTML (which is a good option).

Another option is to use Sweave and specifically the new odfWeave
package for R.  This works on OpenOffice files rather than word files
(but OpenOffice  http://www.openoffice.org/ can inport and export word
documents).

The basic idea is to write your report in OpenOffice (or LaTeX or HTML),
but anywhere that you want statisticial output (graphs, tables) you
include instead the R code to produce the table, graph, or whatever.
Run this file through R (using Sweave or odfWeave) and the resulting
file has replaced all the code segments with their output.

The documentation with odfWeave has examples.

Hope this helps,

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[EMAIL PROTECTED]
(801) 408-8111
 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of sharon snowdon
Sent: Monday, July 17, 2006 2:36 PM
To: r-help@stat.math.ethz.ch
Subject: [R] Output and Word

Hi

I have just started to have a look at R. I have used most stats software
packages and can use perl, visual basic etc. I am interested in how well
it handles lots of output e.g. tables or charts. How would you get lots
of output most easily and quickly into a Word document?

Sharon Snowdon




-






-- 





__
R-help@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

__
R-help@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
and provide commented, minimal, self-contained, reproducible code.