#' @autoImports
rd_wrap <- function(x, indent = 2, exdent = indent) {
return(str_c(x, collapse = "\n\n"))
lines <- str_split(x, "\n")[[1]]
if (all(str_length(lines) < 60)) width <- Inf
wrapped <- str_wrap(x, width = 60, indent = indent, exdent = exdent)
str_c(wrapped, collapse = "\n\n")
}
code_wrap <- function(x, indent = 2, exdent = 4) {
wrapped <- str_wrap(x, width = 60, indent = indent, exdent = exdent)
wrapped <- str_replace_all(wrapped, fixed("\u{A0}"), " ")
str_c(wrapped, collapse = "\n\n")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.