| Title: | Easily Switch Output Format of 'Rmarkdown' Files with Shared Frontmatter |
|---|---|
| Description: | Define the output format of 'rmarkdown' files with shared output 'yaml' frontmatter content. Rather than modifying a shared 'yaml' file, use integers to easily switch output formats for 'rmarkdown' files. |
| Authors: | Luis Martinez [aut, cre, cph] |
| Maintainer: | Luis Martinez <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 1.0.2 |
| Built: | 2026-05-22 05:55:41 UTC |
| Source: | https://github.com/mmartinezluis/customknitrender |
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.
in_format(x)in_format(x)
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". |
The rmarkdown::render function called with the interpreted output format from x
x <- 3 in_format(3) x <- 33 in_format(x)x <- 3 in_format(3) x <- 33 in_format(x)