Learn R Programming

Biograph (version 1.0)

pos.char: Position of a character in a string variable (first match)

Description

Determines the positions of a given character in a string variable and returns the first position. If the character is absent, NA is returned.

Usage

pos.char(string, char)

Arguments

string
Character string
char
The character to position of which needs to be determined

Value

  • The position is returned

See Also

printf

Examples

Run this code
pos.char("test","s")

Run the code above in your browser using DataLab