Skip to contents

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.

Usage

rmd_node()

rmd_ast(nodes = list())

rmd_yaml(yaml = list())

Arguments

nodes

List of rmd_node objects for the AST container

yaml

List containing YAML frontmatter content

Details

The following S7 classes are available for creating R Markdown AST nodes:

Core Classes

  • 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.

Content Nodes

  • 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).

Code and Inline Elements

Structural Elements

See also

rmd_node_utilities for utility functions that work with these S7 objects