counting-op: A pattern counting operator.

Description Usage Arguments Value See Also Examples

Description

Count how often a pattern occurs in a character vector.

Usage

1
2
3
x %n~% re

x %n~f% re

Arguments

x

A character vector to match re against.

re

A regular expression.

Value

The count of the elements in

See Also

Other Operators: %<~%, %~%

Other Operators: %<~%, %~%

Examples

1
c("foo", "bar", "baz") %n~% "^b"

gschofl/gsmisc documentation built on May 17, 2019, 8:52 a.m.