powered by
If the element does not exist, this function returns the empty string.
str_elem(string, index)
A string.
An integer. Negative indexing is allowed as in stringr::str_sub().
stringr::str_sub()
A one-character string.
# NOT RUN { str_elem(c("abcd", "xyz"), 3) str_elem("abcd", -2) # }
Run the code above in your browser using DataLab