nl2br | R Documentation |
This function takes a string and replaces all newline characters (\n
) with
HTML line break tags (<br/>
), which can be useful when you want to render
text with preserved line breaks in a web interface, such as a Shiny app.
nl2br(x)
x |
A character vector where each element is a string in which newline
characters should be replaced with |
A character vector of the same length as x
, where each string has
newline characters replaced with <br/>
tags.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.