in_format: Define output format for rmarkdown files
Description
Defines the output format for rmarkdown's render function using integer representations:
in_format(3) for "pdf_document"
in_format(33) for "html_document"
Any other integer for "word_document" (e.g., in_format(333), in_format(4))
Such a function becomes very handy when rmarkdown files share the same frontmatter
through an _output.yaml file. Refer to project's GitHub page for more information https://github.com/mmartinezluis/customknitrender.
Usage
in_format(x)
Value
The rmarkdown::render function called with the interpreted output format from x
Arguments
x
A numeric, non-decimal value to represent output format: 3 for "pdf_document", 33 for "html_document", and any other integer for "word_document".