[R] Using odfWeave to Produce Tables with Right-aligned Cells
Kuhn, Max
Max.Kuhn at pfizer.com
Fri Aug 24 20:09:28 CEST 2007
It appears to be an OpenOffice bug:
http://www.openoffice.org/issues/show_bug.cgi?id=73163
Max
-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Kuhn, Max
Sent: Friday, August 24, 2007 1:52 PM
To: Rick Bilonick; R Help
Subject: Re: [R] Using odfWeave to Produce Tables with Right-aligned
Cells
Rick,
First, please send the results of SessionInfo so I know exactly what
versions you are using. Also, are you using OpenOffice? If so, what
version?
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:
library(odfWeave)
styles <- getStyleDefs()
styles$rightAligned <- styles$ArialCentered
styles$rightAligned$textAlign <- "right"
setStyleDefs(styles)
current <- getStyles()
current$cellText <- "rightAligned"
setStyles(current)
demoFile <- system.file("examples", "simple.odt", package =
"odfWeave")
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.
Max
-----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
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.
----------------------------------------------------------------------
LEGAL NOTICE\ Unless expressly stated otherwise, this\ messa...{{dropped}}
More information about the R-help
mailing list