includeText | R Documentation |
Insert text into a document.
includeText(path, data = parent.frame(), quiet = TRUE)
path |
Path to the child document. |
data |
Environment or list used to knit the child document. |
quiet |
Passed to |
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()
)
template <- tempfile()
cat("Hello, `r name`.\n", file = template)
includeText(template, data = list(name = "Alice"))
file.remove(template)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.