[R] xtable.by
Charles C. Berry
cberry at tajo.ucsd.edu
Mon Nov 5 18:44:50 CET 2007
See
?ftable
and do
RSiteSearch("latex ftable")
to find some posts relevant to what you need.
Chuck
On Mon, 5 Nov 2007, A Friedman wrote:
> Hi all,
>
> I have a series of measurements made over different types of road surfaces
> and capacity that I want to summarize in tables via LaTeX. Ideally I'd like
> a table similar to this (
> http://www.andy-roberts.net/misc/latex/tutorial4/multirow.png ) with mean/SD
> of the measurement broken down by road type (both surface and capacity).
> Ideally it would be extensible so that when I add layers of heirarchy on top
> the complexity does not increase exponentially (e.g. measurement by road
> surface/capacity by month by neighborhood), but rather take those additional
> levels as arguments.
>
> xtable() is a wonderful thing, but it seems to lack a method for displaying
> the results broken down by a factor as in the table above. One can easily
> write code to add lines between the segments, but then the levels are
> repeated for each row. Has anyone written a method for xtable() to handle
> this (assuming not, otherwise it'd be in the package)? Is there any way to
> pass a \multirow call to xtable() (assuming not, otherwise it'd be in the
> documentation)?
>
> If the answers to both of the above are "no," then can someone give me a
> pointer to a basic but thorough explanation of how generic functions and
> methods are structured (S3, I believe), preferably online. I tried doing
> this via getS3method("xtable","data.frame") and working from there, but the
> method merely sets up things for the generic function to render (it's likely
> I'm getting my terminology somewhat wrong here; please forgive) and what I
> want to do is beyond the bounds of modifying it in this way. I've looked
> through _Writing R Extensions_, but the Generic Functions and Methods
> chapter is only about a page long.
>
> Thanks on behalf of all the lurkers. I've learned much just by reading the
> daily digests over the last few weeks.
> Ari
>
> Ari Friedman
> abfriedman at gmail.com
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.
>
Charles C. Berry (858) 534-2098
Dept of Family/Preventive Medicine
E mailto:cberry at tajo.ucsd.edu UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093-0901
More information about the R-help
mailing list