.paste.char | R Documentation |
Splits a string into words, groups them in chunks of n
words,
then rejoins with a newline. If a string has fewer than n
words,
it remains unaltered.
.paste.char(x, n = 4)
x |
Character vector to process. |
n |
Integer. Number of words per line (default 4). |
Character vector with inserted newlines.
.paste.char("This is a long string we want to split after four words")
.paste.char(c("One phrase", "Another phrase with many words"), n=3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.