Description Usage Arguments Value Author(s) Examples
These functions convert a data matrix into LaTeX.
1 2 3 4 5 6 7 | tex.table(dm, bare = FALSE, prec = if (bare) "NA" else 2,
rnames = if (bare) "-1" else dimnames(dm)[[1]], cnames = if (bare)
"-1" else dimnames(dm)[[2]], caption = NULL, label = NULL,
tpos = "b", stretch = NULL, adjust = "r", file = NULL)
tex.tab0(dm, prec = 2, rnames = NULL, cnames = NULL,
caption = NULL, label = NULL, tpos = "b", stretch = NULL,
adjust = "r", file = NULL)
|
dm |
data matrix |
bare |
TRUE: |
prec |
precision of rounding within the LATEX table, if NA, then no transformation to numeric is done |
rnames |
row names |
cnames |
column names |
caption |
caption for LATEX table, default: no caption |
label |
LATEX label for the table, default: no lable |
tpos |
position of captions: "a" for above table, "b" for below table |
stretch |
optional vector with two entries, giving the baselinestretch for the caption (stretch[1]) and the colums of the table (stretch[2]); default: no adjustment of baselinestretch |
adjust |
adjusts the columns of the LATEX table, default: "r" (right), also possible: "l" (left) and "c" (centre) or user defined: "adjust=c("l","c","r",...)" yields {l|cr...} |
file |
output file, default: printout in console |
These functions are called for their side effect to write to a file.
tex.table |
generate complete minimal Tex-able .tex file, including 'footnotesize' |
tex.tab0 |
same as 'tex.table' but without 'footnotesize' |
?? Adapted by: Christian W. Hoffmann <christian@echoffmann.ch>
1 2 3 4 5 6 7 8 | m <- matrix(rnorm(100),nrow=10,ncol=10,dimnames=list(LETTERS[1:10],colnames=letters[1:10]))
tex.table(m,file="tex.table.tex")
# \begin{tabular}{r|rrrrrrrrrr}
# \hline
# & a & b & c & d & e & f & g & h & i & j\ \hline
# A & -0.63 & 1.51 & 0.92 & 1.36 & -0.16 & 0.40 & 2.40 & 0.48 & -0.57 & -0.54\
# B & 0.18 & 0.39 & 0.78 & -0.10 & -0.25 & -0.61 & -0.04 & -0.71 & -0.14 & 1.21\
# ...
|
Loading required package: lattice
Loading required package: grid
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.