micomp
object to LaTeX
tableThis method converts micomp
objects to character vectors
representing LaTeX
tables.
# S3 method for 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 = "}}"
)
A character vector where each element holds one line of the
corresponding LaTeX
table.
A micomp
object.
Currently ignored.
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.
Vector of strings specifying what data to show. Available options are:
Number of principal components required to explain i-th user-specified percentage of variance.
MANOVA p-values for the i-th user-specified percentage of variance to explain.
Parametric test p-values for the j-th principal component.
Non-parametric test p-values for the j-th principal component.
Parametric test p-values adjusted with weighted Bonferroni procedure for the j-th principal component.
Non-parametric test p-values adjusted with weighted Bonferroni procedure for the j-th principal component.
Explained variance for the j-th principal component.
Output projection on the first two principal components.
Place a separator (e.g. midrule) between data.
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.
Show the column containing the comparison labels?
Show the column containing the data labels
(orientation == T
) or the output labels (orientation == F
)?
Show the tag_outputs
tag? If TRUE, the row
identifier part will have two levels, the tag_outputs
label and output
names (orientation == T
), or the tag_data
and data labels
(orientation == F
). If FALSE only the output names or data labels are
shown.
Tag identifying comparison labels.
Tag identifying data labels.
Tag identifying outputs.
LaTeX
table placement.
Wrap table in the specified LaTeX
environments.
Use booktabs
table beautifier package?
How to align cmidule
when using the
booktabs
package.
Table caption.
Command used for table caption.
Table label for cross-referencing.
Resize table to page column width?
P-value formatter function, which receives a numeric
value between 0 and 1 and returns a string containing the formatted value.
Default is pvalf.default
(requires ulem
LaTeX
package).
Parameters for pvalf_f
function. Default is empty
list.
Vector of strings specifying how TikZ
should
draw points belonging to each group in the score plot.
TikZ
scale for each score plot figure.
LaTeX
code to paste before each TikZ
score plot figure.
LaTeX
code to paste after each TikZ
score plot figure.
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.
# 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)
Run the code above in your browser using DataLab