str_elem | R Documentation |
If the element does not exist, this function returns the empty string. This
is consistent with stringr::str_sub()
. This function is vectorised over
both arguments.
str_elem(string, index)
string |
A character vector. |
index |
An integer. Negative indexing is allowed as in
|
A one-character string.
Other single element extractors:
str_elems()
,
str_paste_elems()
str_elem(c("abcd", "xyz"), 3)
str_elem("abcd", -2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.