Re: [R] Custom LaTeX tables

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Tue, 26 Feb 2008 13:04:01 -0500

On Tue, Feb 26, 2008 at 10:58 AM, Werner Wernersen <pensterfuzzer_at_yahoo.de> wrote:
> Hello,
>
> I am very happy that I have Sweave and R to write my
> papers. But I still have to do some tables by hand
> since I have not found out how I can customize the
> latex tables produced by R further (I mainly use
> xtable()). Like for instance, I have a table which
> needs an extra row every few rows as a group header
> and sometimes I want some extra horizontal lines in
> the table and also a multicolumn heading.
>
> How do you guys cope with such cases, do you set the
> table by hand in the end or have you found a neat way
> to deal with this?
>
> Many thanks and regards,
> Werner

A few options are:

print(xtable(BOD, align = "r|r|r|"), include.rownames = FALSE,

    add.to.row = list(pos = list(0, 3),

        command = c("\\multicolumn{1}{|c|}{(days)} & \\multicolumn{1}{|c|}{(mg/l)} \\\\ ",

        "\\hline \\multicolumn{2}{|l|}{Special Values} \\\\ \\hline ")))


R-help_at_r-project.org 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. Received on Tue 26 Feb 2008 - 18:07:07 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 27 Feb 2008 - 23:30:19 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive