count_pattern: count_pattern

Description Usage Arguments Value Examples

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 May 30, 2019, 8:40 a.m.