Skip to contents

Determines the current knitr table format based on the R option knitr.table.format which can either be set directly to a valid format string or to a function returning one of these strings conditionally.

Usage

knitr_table_format(default = c("pipe", "simple", "html", "latex", "rst"))

Arguments

default

knitr table format to fall back to when the R option knitr.table.format is not set. One of

  • "pipe"

  • "simple"

  • "html"

  • "latex"

  • "rst"

See knitr::kable()'s format argument for details.

Value

A character scalar.

Details

This is basically a convenience wrapper to be able to access the current knitr.table.format in a hassle-free way, i.e. it provides the conditional logic to account for the possibility that knitr.table.format is set to a function rather than a format string.

See also

Other R Markdown and knitr functions: build_readme(), strip_yaml_header()