kth_alpha: String methods

Description Usage Arguments Value Examples

View source: R/strings.R

Description

Extract the k-th alphabetic character (if available) from the characters of a string.

Usage

1
kth_alpha(string, k = 1L)

Arguments

string

An object that inherits from class "character".

k

Integer specifying which alphabetic character to extract.

Value

Returns the k-th alphabetic character (A-Z or a-z) or NA if at least k alphabetic characters are not found.

Examples

1
2
kth_digit("abc0def7ghi5")
kth_digit("abc0def7ghi5", k = 2)

bgreenwell/bmisc documentation built on Sept. 24, 2019, 11:09 a.m.