count_pattern: count_pattern

Description Usage Arguments Value Examples

View source: R/count_pattern.R

Description

Count the number of elements of a vector that match the pattern

Usage

1
count_pattern(vec, pattern, perl = TRUE)

Arguments

vec

A character vector

pattern

character string containing a regular expression.

perl

TRUE or FALSE

Value

An integer

Examples

1
count_pattern(c("aa", "ab", "ac"), "b")

talegari/sidekicks documentation built on Sept. 26, 2018, 4:18 p.m.