shortenstring {relevance} | R Documentation |
Shorten Strings
Description
Strings are shortened if they are longer than
n
Usage
shortenstring(x, n = 50, endstring = "..", endchars = NULL)
Arguments
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 |
Value
Abbreviated string(s)
Author(s)
Werner A. Stahel
See Also
Examples
shortenstring("abcdefghiklmnop", 8)
shortenstring(c("aaaaaaaaaaaaaaaaaaaaaa","bbbbc",
"This text is certainly too long, don't you think?"),c(8,3,20))
[Package relevance version 2.1 Index]