Learn R Programming

genscore (version 1.0.2.2)

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)

Value

A character

Arguments

string

A string.

position

A positive number.

Details

Calls substr(string, position, position).

Examples

Run this code
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