Description Usage Arguments Examples
Split the vector and take the i-th element in each part of the vector.
1 | takeElementInSplit(x,split,numeroElement)
|
x |
character vector, each element of which is to be split. Other inputs, including a factor, will give an error. |
split |
character vector (or object which can be coerced to such) containing regular expression(s) (unless fixed = TRUE) to use for splitting. If empty matches occur, in particular if split has length 0, x is split into single characters. If split has length greater than 1, it is re-cycled along x. |
numeroElement |
indice specifying elements to extract. |
1 2 3 | # x <- c("a_b","b_c","c_d")
# takeElementInSplit(x,split="_",numeroElement=1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.