rmd_classes_s7 | R Documentation |
S7 classes for representing R Markdown AST nodes with automatic validation.
All classes inherit from the base rmd_node
class and provide type-safe object creation
with built-in validation of properties.
rmd_node()
rmd_ast(nodes = list())
rmd_yaml(yaml = list())
nodes |
List of rmd_node objects for the AST container |
yaml |
List containing YAML frontmatter content |
The following S7 classes are available for creating R Markdown AST nodes:
rmd_node()
- Abstract base class for all R Markdown AST nodes. This is the parent class
for all specific node types and should not be instantiated directly.
rmd_ast()
- Container for multiple nodes representing a complete document AST.
rmd_yaml()
- YAML frontmatter header containing document metadata.
rmd_chunk()
- Code chunks with executable code in various engines (R, Python, etc.).
rmd_raw_chunk()
- Raw code chunks that are not executed.
rmd_markdown()
- Plain markdown text content.
rmd_heading()
- Section headings at various levels (1-6).
rmd_code_block()
- Fenced code blocks without execution.
rmd_code_block_literal()
- Code blocks with literal {{...}} attributes.
rmd_inline_code()
- Inline code spans within markdown text.
rmd_shortcode()
- Quarto/Pandoc shortcodes for special functionality.
rmd_span()
- Generic inline spans with attributes.
rmd_fenced_div_open()
- Opening tags for fenced divs (:::).
rmd_fenced_div_close()
- Closing tags for fenced divs (:::).
rmd_node_utilities for utility functions that work with these S7 objects
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.