Learn R Programming

genscore (version 1.0.0)

s_at: Returns the character at a position of a string.

Description

Returns the character at a position of a string.

Usage

s_at(string, position)

Arguments

string

A string.

position

A positive number.

Value

A character

Details

Calls substr(string, position, position).

Examples

Run this code
# NOT RUN {
s_at("123", 1)
s_at("123", 2)
s_at("123", 3)
s_at("123", 4)
s_at("123", 0)
# }

Run the code above in your browser using DataLab