stringbreak | R Documentation |
If a string is long, insert linebreak "\n"
stringbreak(x, k = 20)
x |
Character string. |
k |
Number of characters after which to insert "\n". Default is 20 |
If x is not a character string, x is returned without alteration. And without a warning
Character with "\n" inserted
Paul Johnson <pauljohn@ku.edu>
x <- "abcdef ghijkl mnopqrs tuvwxyz abc def ghi jkl mno pqr stv"
stringbreak(x, 10)
stringbreak(x, 20)
stringbreak(x, 25)
x <- c("asdf asdfjl asfdjkl asdfjklasdfasd", "qrweqwer qwerqwerjklqw erjqwe")
stringbreak(x, 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.