NBSP <- "\U00A0"
wrap <- function(..., indent = 0, prefix = "", width) {
x <- paste0(..., collapse = "")
wrapped <- strwrap2(x, width - nchar_width(prefix), indent)
wrapped <- paste0(prefix, wrapped)
wrapped <- gsub(NBSP, " ", wrapped)
paste0(wrapped, collapse = "\n")
}
strwrap2 <- function(x, width, indent) {
fansi::strwrap_ctl(x, width = max(width, 0), indent = indent, exdent = indent + 2)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.