Description Usage Arguments Value Examples
View source: R/cutcertainstr.R
The function shortens and cuts a given vector to a predefined length.
1 | cutcertainstr(x = c(), split = " ", char = 80, newlines = FALSE)
|
x |
a string |
split |
a pattern with the splitting symbol. The default is " ". |
char |
a numeric with the maximum length of the result. |
newlines |
a boolean that indicates if the output is seperated by a newline operator or split into multiple parts. |
returns a vector with the shortened and cut input string
1 2 3 | x <- "Hello world, this is a test sequence."
cutcertainstr(x, split = ",", char = 30, newlines = FALSE)
# [1] "Hello world," " this is a test sequence."
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.