outTeX | R Documentation |
Exports output from block
or assignment
to a set of .tex files using print(xtable)
.
outTeX(
block.obj,
namesCol = NULL,
file.names = NULL,
captions = NULL,
digits = 2,
...
)
block.obj |
A list of dataframes, such as output from |
namesCol |
An optional character vector of column names to be used in output files. |
file.names |
An optional character vector of file names specifying the output file names. |
captions |
An optional character vector of file names specifying the table captions. See Details below. |
digits |
An integer representing the number of decimal places to which to round multivariate distances in output files, passed to |
... |
Additional arguments passed to |
Under the default (file.names = NULL
), each file is named
“GroupXXX.tex”, where “XXX” is the group name taken
from the input object. Under the default (captions = NULL
),
each caption is “Group XXX.”, where “XXX” is the group
name taken from the input object.
outTeX
appends .tex
to the user-specified file.names
.
The table reference labels are created as t:XXX
, where XXX
is the file name (without .tex
) for the .tex
file containing that table.
captions
takes a list of strings of length equal to the number of groups
in block.obj$blocks
, if block.obj
is output from block
,
or the number of groups in block.obj$assg
, if block.obj
is output
from assignment
.
The tables in the output .tex files can be integrated into an existing .tex document using LaTeX code ‘\include{GroupXXX}’.
A set of .tex files, one for each element of the input list of blocked or assigned units, written by print(xtable)
.
Ryan T. Moore
outCSV
, xtable
, block
, assignment
data(x100)
# Block and assign:
out <- block(x100, groups = "g", n.tr = 2, id.vars = "id", block.vars = c("b1", "b2"))
assg <- assignment(out, seed = 123)
# create three .tex files of blocks
## Not run: outTeX(out)
# create three .tex files of assigned blocks
# (note: overwrites blocked .tex files)
## Not run: outTeX(assg)
# create three .tex files with custom file names and captions
## Not run: outTeX(assg, file.names = c("f1", "f2", "f3"), captions = c("C 1.", "C 2.", "C 3."))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.