[R] Using odfWeave to Produce Tables with Right-aligned Cells

Kuhn, Max Max.Kuhn at pfizer.com
Fri Aug 24 19:51:58 CEST 2007


First, please send the results of SessionInfo so I know exactly what
versions you are using. Also, are you using OpenOffice? If so, what

If you use the current version of odfWeave, there is a file with many
details about formatting in the examples subdirectory.

Here is what I (would) do:

   styles <- getStyleDefs()
   styles$rightAligned <- styles$ArialCentered
   styles$rightAligned$textAlign <- "right"
   current <- getStyles()
   current$cellText <- "rightAligned"
   demoFile <- system.file("examples", "simple.odt", package =
   odfWeave(demoFile, "test.odt") 

Strangely, this *left* justifies the text (you probably already know
this but you didn't provide any details). I checked the xml and it is
doing what I intended (using an alignment of "center" works just fine). 

Looking at the ODF specification, a value of "end" can also be used. I
used this in the code above and it worked. I'll dig a little deeper, but
this should help.


-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Rick Bilonick
Sent: Friday, August 24, 2007 1:30 PM
To: R Help
Subject: [R] Using odfWeave to Produce Tables with Right-aligned Cells

I cannot figure out how to use odfWeave to produce tables with
right-aligned columns. None of the examples show this and I'm completely
confused on how to achieve this. Could someone share a simple example?

Rick B.

R-help at stat.math.ethz.ch mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.

LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}

More information about the R-help mailing list