toLatex.micomp | R Documentation |
micomp
object to LaTeX
tableThis method converts micomp
objects to character vectors
representing LaTeX
tables.
## S3 method for class 'micomp'
toLatex(
object,
...,
orientation = T,
data_show = c("npcs-1", "mnvp-1", "parp-1", "nparp-1", "scoreplot"),
data_labels = NULL,
labels_cmp_show = T,
labels_col_show = T,
label_row_show = T,
tag_comp = "Comp.",
tag_data = "Data",
tag_outputs = "Outputs",
table_placement = "ht",
latex_envs = c("center"),
booktabs = F,
booktabs_cmalign = "l",
caption = NULL,
caption_cmd = "\\caption",
label = NULL,
col_width = F,
pvalf_f = pvalf.default,
pvalf_params = list(),
scoreplot_marks = c("mark=square*,mark options={color=red},mark size=0.8pt",
"mark=diamond*,mark options={color=black},mark size=1pt",
"mark=triangle*,mark options={color=green},mark size=1pt"),
scoreplot_scale = 6,
scoreplot_before = "\\raisebox{-.5\\height}{\\resizebox {1.2cm} {1.2cm} {",
scoreplot_after = "}}"
)
object |
A |
... |
Currently ignored. |
orientation |
If TRUE, outputs are placed along columns, while data is placed along rows. If FALSE, outputs are placed along rows, while data is placed along columns. |
data_show |
Vector of strings specifying what data to show. Available options are:
|
data_labels |
Vector of strings specifying the labels of the data to show. If NULL, default labels are used for all elements. If individual elements are set to NA, default labels will be used for those elements. |
labels_cmp_show |
Show the column containing the comparison labels? |
labels_col_show |
Show the column containing the data labels
( |
label_row_show |
Show the |
tag_comp |
Tag identifying comparison labels. |
tag_data |
Tag identifying data labels. |
tag_outputs |
Tag identifying outputs. |
table_placement |
|
latex_envs |
Wrap table in the specified |
booktabs |
Use |
booktabs_cmalign |
How to align |
caption |
Table caption. |
caption_cmd |
Command used for table caption. |
label |
Table label for cross-referencing. |
col_width |
Resize table to page column width? |
pvalf_f |
P-value formatter function, which receives a numeric
value between 0 and 1 and returns a string containing the formatted value.
Default is |
pvalf_params |
Parameters for |
scoreplot_marks |
Vector of strings specifying how |
scoreplot_scale |
|
scoreplot_before |
|
scoreplot_after |
|
This method is inspired by the functionality provided by the xtable
and print.xtable
functions (from the
xtable
package), but follows the standard behavior of the
toLatex
generic.
A character vector where each element holds one line of the
corresponding LaTeX
table.
# Create a micomp object, use provided dataset, three first outputs, plus
# a fourth concatenated output
mic <- micomp(4, 0.8,
list(list(name = "NLOKvsJEXOK", grpout = pphpc_ok),
list(name = "NLOKvsJEXNOSHUFF", grpout = pphpc_noshuff),
list(name = "NLOKvsJEXDIFF", grpout = pphpc_diff)),
concat = TRUE)
# Print latex table source to screen
toLatex(mic)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.