knitr_table_format: Determine current knitr table format

knitr_table_formatR Documentation

Determine current knitr table format

Description

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.

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.

Value

A character scalar.

See Also

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


salim-b/pal documentation built on Feb. 28, 2025, 6:51 p.m.