search_df counts the number of occurrences of a specified value in each column of a given data.frame. The output will show the count for each column that had at least one value matching the search criteria.

search_df(.df, .value)

Arguments

.df

a data.frame for the count of a value in each column

.value

numeric or character value to search

Examples

search_df(Theoph, 1)
#> # A tibble: 2 × 2
#>   name      n_1
#>   <chr>   <int>
#> 1 Subject    11
#> 2 Time        3