Paste {tables} | R Documentation |
Generate terms to paste values together in table.
Description
This function generates a component of a table formula to output multiple columns with punctuation between. It is designed only for LaTeX output.
Usage
Paste(..., head, digits=2, justify="c", prefix="", sep="", postfix="",
character.only = FALSE)
Arguments
... |
Expressions to be displayed in the columns of the table. If they are named, they will get those names as headings, otherwise they will not be labelled. |
head |
If not missing, this will be used as a column heading for the combined columns. |
digits |
Will be passed to the |
justify |
One or more justifications to use on the individual columns. |
sep |
One or more separators to use between columns. |
prefix , postfix |
Additional text to insert before and after the group of columns. |
character.only |
If |
Value
An expression which will produce the requested output in LaTeX.
Examples
stderr <- function(x) sd(x)/sqrt(length(x))
lcl <- function(x) mean(x) - qt(0.975, df=length(x)-1)*stderr(x)
ucl <- function(x) mean(x) + qt(0.975, df=length(x)-1)*stderr(x)
toLatex( tabular( (Species+1) ~ All(iris)*
Paste(lcl, ucl, digits = 2,
head="95\% CI",
prefix = "[", sep = ",", postfix = "]"),
data=iris ) )