char_at {jjb} | R Documentation |
Character at Position i
Description
Returns the character at location i inside the string.
Usage
char_at(x, index)
Arguments
x |
A |
index |
An |
Value
A character vector
of length index
.
Author(s)
James J Balamuta
Examples
# Example string
s = "statistics"
# Single character
char_at(s, 1)
# Vectorized position
char_at(s, c(2, 3))
[Package jjb version 0.1.1 Index]