latex.table.by: Exports a latex table with the first N columns being multirow...

Description Usage Arguments Value See Also Examples

Description

Given a data.frame with the first N columns of grouping variables, makes each group print nicely in a LaTeX table.

Usage

1
  latex.table.by(df, num.by.vars = 1, ...)

Arguments

df

data.frame with first num.by.vars columns being grouping variables

num.by.vars

Number of columns to interpret as grouping vars

...

Other arguments to pass to xtable

Value

A modified xtable object.

See Also

xtable, bytable

Examples

1
2
3
4
5
6
my.test.df <- data.frame(grp=rep(c("A","B"),each=10),data=runif(20))
library(xtable)
latex.table.by(my.test.df)
#   print(latex.table.by(test.df), include.rownames = FALSE, include.colnames = TRUE, sanitize.text.function = force)
#   then add \usepackage{multirow} to the preamble of your LaTeX document
#   for longtable support, add ,tabular.environment='longtable' to the print command (plus add in ,floating=FALSE), then \usepackage{longtable} to the LaTeX preamble

gsk3/taRifx documentation built on May 17, 2019, 8:55 a.m.