Skip to contents

Adds a text block to a content collection. Can be used standalone or in a pipe. Supports viz_collection as first argument for seamless piping.

Usage

add_text(content_collection = NULL, text, ...)

Arguments

content_collection

A content_collection, viz_collection, or NULL

text

Markdown text content (can be multi-line)

...

Additional text lines (will be combined with newlines)

Value

Updated content_collection object

Examples

if (FALSE) { # \dontrun{
# Standalone
text_block <- add_text("# Welcome")

# Pipe with content
content <- create_content() %>%
  add_text("## Introduction")

# Pipe directly from viz
content <- create_viz() %>%
  add_viz(type = "histogram", x_var = "age") %>%
  add_text("Analysis complete")
} # }