wrapLaTable {simsalapar} | R Documentation |
Wrapper for a floating LaTeX Table
Description
wrapLaTable()
wraps (a table and tabular environment) around
the lines of the body of a LaTeX table and utilizes
writeLines()
to write the LaTeX table.
Usage
wrapLaTable(x, align, do.table = TRUE, placement = "htbp", center = TRUE,
fontsize = "normalsize", booktabs = TRUE,
caption = NULL, label = NULL)
Arguments
x |
a |
align |
table columns alignment string (e.g.,
|
do.table |
|
placement |
(if |
center |
|
fontsize |
|
booktabs |
|
caption |
(if |
label |
(if |
Details
Note that necessary LaTeX packages (such as tabularx
) have to
be loaded in the preambel of the corresponding .tex or .Rnw file.
Value
a “LaTeX table”, of class "Latex"
(where the
print
method uses writeLines()
).
Author(s)
Marius Hofert.
References
see simsalapar-package
.
See Also
toLatex()
where it is used to create
a LaTeX table.
Examples
ftab <- ftable(Titanic, row.vars = 1:2)
fftab <- fftable(ftab)
tlist <- tablines(fftab)
wrapLaTable(structure(tlist$body, head = tlist$head), align = tlist$align,
caption="The Titanic data set.", label="tab:titanic")