string_count: Count the number of occurrences of a string over a data frame...

View source: R/utils_df.R

string_countR Documentation

Count the number of occurrences of a string over a data frame row-wise

Description

Count the number of occurrences of a string over a data frame row-wise

Usage

string_count(df, pattern = "", new_colname = "count")

Arguments

df

A dataframe

pattern

A pattern to pass to stringr::str_count(). Default to "".

new_colname

The newly-mutated colname. Default to "count".

Value

A mutated dataframe


gnoblet/impactR documentation built on March 20, 2023, 2:24 a.m.