Description Usage Arguments Value Examples
Reduce number of characters for each element of a character vector by replacting the part that beyond Nchar (e.g. 50) character to '...'.
1 | vec_char_redu(vec, Nchar = 50)
|
vec |
character vector to be reduced |
Nchar |
integer, for each element in the vec, number of characters to remain |
character vector after reducing
1 2 | vec <- c(strrep('a', 60), strrep('b', 30))
vec2 <- vec_char_redu(vec, Nchar=50)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.