shortenstring {relevance} | 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
shortenstring("abcdefghiklmnop", 8)
shortenstring(c("aaaaaaaaaaaaaaaaaaaaaa","bbbbc",
"This text is certainly too long, don't you think?"),c(8,3,20))