Skip to contents

Search in data frame

Usage

search_in(df, dfcol, search)

Arguments

df

A <data.frame> or <tibble>

dfcol

A <character> or <symbol> specifying the column to search in

A <character> or <symbol> specifying the search term

Value

A <data.frame> or <tibble>

Examples

x <- dplyr::tibble(y = 1:10,
                   z = letters[1:10])

search_in(df = x,
          dfcol = x$z,
          search = c("a", "j"))
#> # A tibble: 2 × 2
#>       y z    
#>   <int> <chr>
#> 1     1 a    
#> 2    10 j