Search a data frame column by string
See also
Other tidyverse:
columns_to_character()
,
gchop()
,
glue_chr()
,
glue_data_chr()
,
named_group_split()
Examples
(x <- dplyr::tibble(y = 1:10, z = letters[1:10]))
#> # A tibble: 10 × 2
#> y z
#> <int> <chr>
#> 1 1 a
#> 2 2 b
#> 3 3 c
#> 4 4 d
#> 5 5 e
#> 6 6 f
#> 7 7 g
#> 8 8 h
#> 9 9 i
#> 10 10 j
search_for(data = x, column = "z", search = "[a|j]")
#> # A tibble: 2 × 2
#> y z
#> <int> <chr>
#> 1 1 a
#> 2 10 j