CodeChunk {stencilaschema} | R Documentation |
A executable chunk of code.
Description
A executable chunk of code.
Usage
CodeChunk(
text,
alters,
assigns,
caption,
declares,
duration,
errors,
exportFrom,
format,
id,
importTo,
imports,
label,
meta,
outputs,
programmingLanguage,
reads,
uses
)
Arguments
text |
The text of the code. Required. |
alters |
Names of variables that the code chunk alters. |
assigns |
Variables that the code chunk assigns to. |
caption |
A caption for the CodeChunk. |
declares |
Variables that the code chunk declares. |
duration |
Duration in seconds of the last execution of the chunk. |
errors |
Errors when compiling or executing the chunk. |
exportFrom |
A compilation directive giving the name of the variable to export into the content of the code block. |
format |
Media type, typically expressed using a MIME format, of the code. |
id |
The identifier for this item. |
importTo |
A compilation directive giving the name of the variable to import the content of the code block as. |
imports |
Software packages that the code chunk imports |
label |
A short label for the CodeChunk. |
meta |
Metadata associated with this item. |
outputs |
Outputs from executing the chunk. |
programmingLanguage |
The programming language of the code. |
reads |
Filesystem paths that this code chunk reads from. |
uses |
Names of variables that the code chunk uses (but does not alter). |
Value
A list
of class CodeChunk
See Also
Examples
CodeChunk(
programmingLanguage = "r",
text = "plot(1)",
label = "Figure 1",
id = "fig1",
caption = list(
Heading(
content = list("Figure title"),
depth = 2
),
Paragraph(
content = list(
"A paragraph with some",
Strong(content = list("strong emphasis")),
"in it."
)
)
)
)