Type: Package
Title: Easily Switch Output Format of 'Rmarkdown' Files with Shared Frontmatter
Version: 1.0.2
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.
License: MIT + file LICENSE
Encoding: UTF-8
RoxygenNote: 7.3.3
Suggests: testthat (≥ 3.0.0)
Config/testthat/edition: 3
Imports: rmarkdown
NeedsCompilation: no
Packaged: 2025-12-11 01:00:17 UTC; luismartinez
Author: Luis Martinez [aut, cre, cph]
Maintainer: Luis Martinez <lmmartinez3312@gmail.com>
Repository: CRAN
Date/Publication: 2025-12-17 10:00:13 UTC

Define output format for rmarkdown files

Description

Defines the output format for rmarkdown's render function using integer representations:

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)

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".

Value

The rmarkdown::render function called with the interpreted output format from x

Examples

x <- 3
in_format(3)

x <- 33
in_format(x)