print_table_md: Print a character matrix as a table.

View source: R/utils.R

print_table_mdR Documentation

Description

Print a character matrix as a table.

Usage

print_table_md(
  x,
  col_sep = "",
  header_sep = "",
  row_begin = "",
  row_end = "",
  table_before = NA_character_,
  table_after = NA_character_,
  table_style = c("plain", "md", "latex", "booktabs"),
  ...
)

Arguments

x

A character matrix.

col_sep

Column separator. Default to "".

header_sep

Header separator. Default to "-". If header_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.

Value

No return.

See Also

print.hgwrm(), summary.hgwrm().


hgwrr documentation built on April 4, 2025, 3:57 a.m.