powered by
Returns the character at location i inside the string.
char_at(x, index)
A character vector to extract position from.
character vector
An integer between 1 and length n.
integer
A character vector of length index.
index
# NOT RUN { # Example string s = "statistics" # Single character char_at(s, 1) # Vectorized position char_at(s, c(2, 3)) # }
Run the code above in your browser using DataLab