Learn R Programming

baizer (version 0.8.0)

fetch_char: fetch character from strings

Description

fetch character from strings

Usage

fetch_char(s, index_list, na.rm = FALSE, collapse = FALSE)

Value

list of characters

Arguments

s

strings

index_list

index of nth character, can be output of diff_index or same_index

na.rm

remove NA values from results or not

collapse

optional string used to combine the characters from a same string

Examples

Run this code
fetch_char(rep("ABC", 3), list(1, 2, 3))

Run the code above in your browser using DataLab