fetch character from strings
Usage
fetch_char(s, index_list, na.rm = FALSE, collapse = FALSE)
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
fetch_char(rep("ABC", 3), list(1, 2, 3))
#> [[1]]
#> [1] "A"
#>
#> [[2]]
#> [1] "B"
#>
#> [[3]]
#> [1] "C"
#>