[R] Transfer Crosstable to Word-Document

Udo König ukoenig at med.uni-marburg.de
Sun Feb 17 14:49:00 CET 2008


(2. attempt to post this)
(Udo)


Quoting Greg Snow <Greg.Snow at imail.org>:

> If your final goal is a word document, then you should look at the odfWeave
> package.
>

At work my primary goal has to be a word document, because:

     * we have a Windows-XP network with MS-Office software
     * my boss and my colleagues are not firm with other software (I have to
       cooperate with them)

My idea is to insert simple tables into Word (what I asked for in this thread)
and to make more sohisticated tables -like [1]- with latex and include them as
a graphic file. I would NOT like to make such a table with MS-Word! I read an
introductory Latex script and asked our admin to install the Miktex package on
my computer.

At home I can fortunately do what I want (Windows, Linux, OpenOffice,...).

Greg:
To the odfWeave package: in [2] I found the sentence "The package is currently
limited to creating text documents using OpenOffice". So it doesn´t seem work
with MS-Word?



[1] #Taken from:
http://biostat.mc.vanderbilt.edu/twiki/pub/Main/StatReport/summary.pdf, p. 28

library(Hmisc)
getHdata(pbc)
attach(pbc)

s5 <- summary(drug ~ bili + albumin + stage + protime + sex + age + spiders,
              method="reverse", dta=pbc, test=TRUE)
options(digits=1)
print(s5, npct="both")
options(digits=3)

w <- latex(s5, size="smaller", npct="both",
           npct.size="smaller[2]", Nsize="smaller[2]",
           msdsize="smaller[2]",
           middle.bold=TRUE, landscape=TRUE)

wd <- dvi(w)
detach(pbc)


[2] R newsletter, Volume 6/4, October 2006, p.3


--------------------------------------------
Udo König
Clinic for Child an Adolescent Psychiatry
Philipps University of Marburg / Germany



More information about the R-help mailing list