Description Usage Arguments Value See Also Examples
Given a data.frame with the first N columns of grouping variables, makes each group print nicely in a LaTeX table.
1 | latex.table.by(df, num.by.vars = 1, ...)
|
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 |
A modified xtable object.
xtable, bytable
1 2 3 4 5 6 7 8 9 10 11 12 | my.test.df <- data.frame(grp=rep(c("A","B"),each=10),data=runif(20))
library(xtable)
latex.table.by(my.test.df)
## Not run:
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
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.