[R] exporting tables to word
ashenkin at ufl.edu
Tue Apr 2 19:50:46 CEST 2013
ftable has some internal routines, it seems, that allow it to print out
a flat contigency table in a nice format. Converting to data.frame ends
up messing up the display format, unfortunately.
On 4/2/2013 12:41 PM, Carlos Valenzuela wrote:
> You may also want to consider the "rtf" package. It works okay. You would
> have to save your results as a dataframe and you would be able to write
> that object out to an .rtf (or even use an .doc extension, as I have seen
> it done).
> For example,
> # Your regression formula
> lmobj<-lm(dv~iv1 + iv2 + iv3, data=dat)
> # Output location for .rtf file
> # Specify the width, height, font size, etc and margins
> addHeader(rtf,title="Title of Table, subtitle="Subtitle")
> addTable(rtfdoc, lmresults, font.size=10, row.names=T, NA.string="-")
> This is a very crude example so I would suggest looking at the help files
> associated with the "rtf" package to make any modifications, such as adding
> other regression results/tables.
> Thanks and hope this helps,
> On Tue, Apr 2, 2013 at 12:13 PM, Alexander Shenkin <ashenkin at ufl.edu> wrote:
>> Thanks Frans,
>> odfTable seems not to like ftable objects. any thoughts?
>> Error: chunk 1 (label = damageTable)
>> Error in UseMethod("odfTable") :
>> no applicable method for 'odfTable' applied to an object of class
>> On 4/2/2013 8:09 AM, Frans Marcelissen wrote:
>>> Hi Allie,
>>> My preferred method is by means of odfWeave. Odfweave generates a
>>> libreoffice file, which can directly be transferred to word.
>>> A second way is run R from within spss. Spss has a much better output
>>> R, but you can use the output system of spss (by means of
>>> 2013/4/2 Alexander Shenkin <ashenkin at ufl.edu>
>>>> Hello all,
>>>> What is your preferred method to export tables (from ftable()) to Word?
>>>> Do you just export to a text file and then copy/paste? Or perhaps via
>>>> HTML output?
>>>> R-help at r-project.org mailing list
>>>> PLEASE do read the posting guide
>>>> and provide commented, minimal, self-contained, reproducible code.
>> [[alternative HTML version deleted]]
>> R-help at r-project.org mailing list
>> PLEASE do read the posting guide
>> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help