default_output_format

0th

Percentile

Determine the default output format for an R Markdown document

Read the YAML metadata (and any common output YAML file) for the document and return the output format that will be generated by a call to render.

Usage
default_output_format(input, output_yaml = NULL)
Arguments
input

Input file (Rmd or plain markdown)

output_yaml

Paths to YAML files specifying output formats and their configurations. The first existing one is used. If none are found, then the function searches YAML files specified to the output_yaml top-level parameter in the YAML front matter, _output.yml or _output.yaml, and then uses the first existing one.

Details

This function is useful for front-end tools that require additional knowledge of the output to be produced by render (e.g. to customize the preview experience).

Value

A named list with a name value containing the format name and an options value that is a list containing all the options for the format and their values. An option's default value will be returned if the option isn't set explicitly in the document.

Aliases
  • default_output_format
Documentation reproduced from package rmarkdown, version 2.2, License: GPL-3

Community examples

Looks like there are no examples yet.