[R] xtable.by

Richard M. Heiberger rmh at temple.edu
Mon Nov 5 20:39:07 CET 2007


## I would use latex() for this example.

library(Hmisc)
team.dat <- '
GK Paul Robinson
LB Lucus Radebe
DC Michael Duberry
DC Dominic Matteo
RB Didier Domi
MC David Natty
MC Eirik Bakke
MC Jody Morris
FW Jamie Mcmaster
ST Alan Smith
ST Mark Viduka
'

team <- read.table(textConnection(team.dat),
                   col.names=c("position", "first", "last"))
team$name <- paste(team$first, team$last)
team <- team[c("position","name")]
team             
team.latex <-
  latex(team,
        rowlabel="",
        rowname="",
 
rgroup=c("Goalkeeper","Defenders","Midfielders","Forward","Strikers"),
        n.rgroup=c(1,4,3,1,2))


## The file named in print.default(team.latex) has the complete tabular
## environment for the example.  There are many more arguments for fine
tuning the
## appearance of the table.


-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On
Behalf Of A Friedman
Sent: Monday, November 05, 2007 11:32 AM
To: r-help at r-project.org
Subject: [R] xtable.by

http://www.andy-roberts.net/misc/latex/tutorial4/multirow.png



More information about the R-help mailing list