xtableMatharray {xtable} | R Documentation |
Create LaTeX Mathematical Array
Description
Convert an array of numbers or mathematical expressions into an
xtableMatharray
object so it can be printed. A convenience
function to enable the printing of arrays in mathematical expressions
in LaTeX.
Usage
xtableMatharray(x, caption = NULL, label = NULL, align = NULL,
digits = NULL, display = NULL, auto = FALSE, ...)
Arguments
x |
A numeric or character matrix. |
caption |
Character vector of length 1 or 2 containing the
table's caption or title. If length is 2, the second item is the
"short caption" used when LaTeX generates a "List of Tables". Set to
|
label |
Character vector of length 1 containing the LaTeX
label. Set to |
align |
Character vector of length equal to the number of columns
of the resulting table, indicating the alignment of the corresponding
columns. Also, |
digits |
Numeric vector of length equal to one (in which case it
will be replicated as necessary) or to the number of columns of the
resulting table or matrix of the same size as the resulting
table, indicating the number of digits to display in the
corresponding columns. Since the row names are printed in the first
column, the length of the vector |
display |
Character vector of length equal to the number of columns of the
resulting table, indicating the format for the corresponding columns.
Since the row names are printed in the first column, the length of
|
auto |
Logical, indicating whether to apply automatic format when no value
is passed to |
... |
Additional arguments. (Currently ignored.) |
Details
This function is only usable for production of LaTeX documents, not HTML.
Creates an object of class
c("xtableMatharray","xtable","data.frame")
, to ensure that it is
printed by the print method print.xtableMatharray
.
Value
An object of class c("xtableMatharray","xtable","data.frame")
.
Author(s)
David Scott <d.scott@auckland.ac.nz>
See Also
Examples
V <- matrix(c(1.140380e-03, 3.010497e-05, 7.334879e-05,
3.010497e-05, 3.320683e-04, -5.284854e-05,
7.334879e-05, -5.284854e-05, 3.520928e-04), nrow = 3)
mth <- xtableMatharray(V)
class(mth)
str(mth)
unclass(mth)