Description Usage Arguments Details Value Examples
View source: R/add_line_breaks.R
This function takes a vector of strings and adds line breaks every n
characters. Primarily built to be called internally by format_citation
, this function has been made available as it can be useful in other contexts.
1 | add_line_breaks(x, n = 50, html = FALSE)
|
x |
Either a string or a vector; if the vector is not of class |
n |
Numeric: The number of characters that should separate consecutive line breaks. |
html |
Logical: Should the function add HTML line breaks ( |
Line breaks are only added between words, so the value of n
is acutally a threshold value rather than being matched exactly.
Returns the input vector unaltered except for the addition of line breaks.
1 2 3 4 5 6 | file_location <- system.file(
"extdata",
"avian_ecology_bibliography.ris",
package = "revtools")
x <- read_bibliography(file_location)
add_line_breaks(x$title)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.