makecodechunk | R Documentation |
Create Text for Running Code Chunk
makecodechunk(
cmd,
opts = NULL,
results = "asis",
lang = "r",
callout = NULL,
h = NULL,
w = NULL
)
cmd |
character string vector of commands to run inside chunk |
opts |
optional list of chunk options, e.g. |
results |
format of results, default is |
lang |
language for the chunk |
callout |
an optional Quarto callout to include after |
h |
optional height to place after the chunk header after |
w |
optional width |
Creates text strings suitable for running through knitr
. The chunk is given a random name because certain operations are not allowed by knitr
without it.
character vector
Frank Harrell
makecodechunk('x <- pi; print(x)')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.