Print a character matrix as a table.
Arguments
- x
A character matrix.
- col.sep
Column separator. Default to
""
.- header.sep
Header separator. Default to
"-"
. Ifheader.sep
only contains one character, it will be repeated for each column. If it contains more than one character, it will be printed below the first row.- row.begin
Character at the beginning of each row. Default to
col.sep
.- row.end
Character at the ending of each row. Default to
col.sep
.- table.before
Characters to be printed before the table.
- table.after
Characters to be printed after the table.
- table.style
Name of pre-defined style. Possible values are
"plain"
,"md"
,"latex"
, or"booktabs"
. Default to"plain"
.- ...
Additional style control arguments.
Details
When table.style
is specified, col.sep
, header.sep
, row.begin
and row.end
would not take effects.
Because this function will automatically set their values.
For each possible value of table.style
, its corresponding style settings
are shown in the following table.
plain | md | latex | |
col.sep | "" | "|" | "&" |
header.sep | "" | "-" | "" |
row.begin | "" | "|" | "" |
row.end | "" | "|" | "\\" |
In this function, characters are right padded by spaces.