| align_pander {docxtools} | R Documentation |
Uses pander() to print a data frame as a table to the output
document.
align_pander(x, align_idx = NULL, caption = NULL)
x |
A data frame to be printed in the output document. |
align_idx |
Optional string made up of |
caption |
Optional string used as the |
Uses panderOptions('table.alignment.default') argument to assign
output column alignment. The default alignments are numeric right and
everything else left.
If align_idx is not NULL, a warning message is generated if its
string length does not match the number of columns in the table.
The function also sets these pander options as defaults:
table.split.table = Inf
keep.trailing.zeros = TRUE
style = 'simple'
Prints the data frame in table form using pander(x).
x <- mtcars[1:5, 1:5] align_pander(x) align_pander(x, align_idx = "rcrrr") align_pander(x, caption = "A nicely formatted table")