Count the number of occurrences of a string over a data frame row-wise
Source:R/utils_df.R
string_count.Rd
Count the number of occurrences of a string over a data frame row-wise
Arguments
- df
A dataframe
- pattern
A pattern to pass to
stringr::str_count()
. Default to "".- new_colname
The newly-mutated colname. Default to "count".