shortenstring | R Documentation |
Strings are shortened if they are longer than
n
shortenstring(x, n = 50, endstring = "..", endchars = NULL)
x |
a string or a vector of strings |
n |
maximal character length |
endstring |
string(s) to be appended to the shortened strings |
endchars |
number of last characters to be shown at the end of
the abbreviated string. By default, it adjusts to |
Abbreviated string(s)
Werner A. Stahel
substring
, abbreviate
shortenstring("abcdefghiklmnop", 8)
shortenstring(c("aaaaaaaaaaaaaaaaaaaaaa","bbbbc",
"This text is certainly too long, don't you think?"),c(8,3,20))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.