Print Math Array
For an object of class "xtableMatharray"
, returns the LaTeX
commands to produce an array.
## S3 method for class 'xtableMatharray' print(x, print.results = TRUE, format.args = getOption("xtable.format.args", NULL), scalebox = getOption("xtable.scalebox", NULL), comment = FALSE, timestamp = NULL, ...)
x |
An object of class |
print.results |
If |
format.args |
List of arguments for the |
scalebox |
If not |
comment |
If |
timestamp |
Timestamp to include in LaTeX comment. Set this
to |
... |
Additional arguments. (Currently ignored.) |
This command prints an array of numbers which may be included in a
mathematical expression in a LaTeX document created using Sweave
or knitr. Internally it calls print.data.frame
but with
special values for the arguments, namely that the tabular environment
is array
, row names and column names are not included, and there
are no horizontal lines. Note that the default values for the arguments
comment
and timestamp
are different to the default values
for print.xtable
, the justification being that comments would
make the resulting LaTeX harder to read.
A character vector containing the LaTeX code for incorporating an array in a mathematical expression.
David Scott d.scott@auckland.ac.nz.
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) ### Simple test of print.xtableMatharray print.xtableMatharray(xtable(V, display = rep("E", 4))) class(V) <- c("xtableMatharray") class(V) ### Test without any additional arguments mth <- xtableMatharray(V) str(mth) print(mth) ### Test with arguments to xtable mth <- xtableMatharray(V, display = rep("E", 4)) str(mth) print(mth) mth <- xtableMatharray(V, digits = 6) str(mth) print(mth) ### Test with additional print.xtableMatharray arguments mth <- xtableMatharray(V, digits = 6) str(mth) print(mth, format.args = list(decimal.mark = ",")) print(mth, scalebox = 0.5) print(mth, comment = TRUE) print(mth, timestamp = "2000-01-01") print(mth, comment = TRUE, timestamp = "2000-01-01")
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.