add_newlines | R Documentation |
Returns a character string with newlines every nth character. Works for character vectors too.
add_newlines(x, line_length = 95)
x |
(chr vector) The strings to split with newlines. |
line_length |
(num scalar) The desired max length of each line. Defaults to 95 (suitable for ggplot2). |
set.seed(2)
add_newlines(paste0(sample(c(letters, " "), size = 100, replace = T), collapse = ""))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.