Skip to contents

Write R Chunk to Add Child Document

Usage

add_child(x, label = NULL)

Arguments

x

section .qmd file to add into the template, options for sections are in the 'skeleton' folder; only select XX_section.qmd files and not a, b, c... subfiles

label

description for the child document being added (short - one/two words max)

Value

Formatting R chunk for child document to add section into the template/skeleton. Utilize the cat() function to implement into readable text.

Examples

add_child("test_quarto.qmd", label = "test_doc")
#> [1] "\n {{< pagebreak >}} \n\n```{r, results='asis'}\n#| label: 'test_doc'\n#| eval: true\n#| echo: false\n#| warning: false\na <- knitr::knit_child('test_quarto.qmd', quiet = TRUE)\ncat(a, sep = '\\n')\n```\n"