| render_text | R Documentation |
Render markdown-formatted text in the console with beautiful styling. This function uses the same rendering engine as the streaming output, supporting headers, lists, code blocks, and other markdown elements.
render_text(text)
text |
A character string containing markdown text, or a GenerateResult object. |
NULL (invisibly)
if (interactive()) {
# Render simple text
render_text("# Hello\n\nThis is **bold** text.")
# Render with code block
render_text("Here is some R code:\n\n```r\nx <- 1:10\nmean(x)\n```")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.