text_count: generic for counting pattern occurences

Description Usage Arguments

View source: R/text_count.R

Description

generic for counting pattern occurences

text_count default method

Usage

1
2
3
4
text_count(string, pattern, sum = FALSE, vectorize = FALSE, ...)

## Default S3 method:
text_count(string, pattern, sum = FALSE, vectorize = FALSE, ...)

Arguments

string

text to search through

pattern

regex to search for

sum

if true all element-wise counts will be summed up

vectorize

should function be used in vectorized mode, i.e. should a pattern with length larger than 1 be allowed and if so, should it be matched to lines (with recycling if needed) instead of using on element on all lines

...

further arguments passed through to grep


stringb documentation built on Jan. 26, 2021, 1:07 a.m.

Related to text_count in stringb...