[R] Formatting cgroup and factor level labels in Hmisc latex function
Dieter Menne
dieter.menne at menne-biomed.de
Tue Jan 26 19:54:18 CET 2010
stefan.petersson wrote:
>
>
> I'm trying to typeset at simple crosstable with the Hmisc latex function.
> And I have two problems.
>
> 1. How do I make all columns the same width? The Latex function seems very
> unwilling to break the 'cgroup' labels and the factor level labels. Please
> have look at this screenshot that shows my problem:
>
> >> http://hem.passagen.se/stpe9096/table.png
>
> So, how can I make sure that the cgroup labels and the factor level labels
> are sufficiently line breaked and/or hyphenated to make the columns evenly
> spaced?
>
>
To force a fixed width, use a custom latex column format and pass it to the
latex function. If this does not solve the column break problem, manually
pass the column titles and insert a "\n". I have used the first version, the
second one might not work.
stefan.petersson wrote:
>
>
> 2. Is there something like a 'widetable' package that can break a wide
> table into several tables with repeated 'rgroup' labels? As You can see in
> the screenshot, the table runs way off the page. And I know that there is
> a 'longtable' package that can do exactly this, but for tables with long
> rgroup lists.
>
>
A workaround is to rotate the output with latex, or to use a smaller font.
Also, making the padding space columns in latex smaller can help.
Dieter
--
View this message in context: http://n4.nabble.com/Formatting-cgroup-and-factor-level-labels-in-Hmisc-latex-function-tp1290232p1310696.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list