Learn R Programming

juicedown (version 0.1.1)

includeText: Insert text into a document.

Description

Insert text into a document.

Usage

includeText(path, data = parent.frame(), quiet = TRUE)

Value

An R object of class "knit_asis" (defined in the knitr package), the data of which represents the content of the child document (after knitr::knit())

Arguments

path

Path to the child document.

data

Environment or list used to knit the child document.

quiet

Passed to knitr::knit().

Examples

Run this code
template <- tempfile()
cat("Hello, `r name`.\n", file = template)
includeText(template, data = list(name = "Alice"))
file.remove(template)

Run the code above in your browser using DataLab