countCharOccurrences: Counts the number of times a single characte occurs

Description Usage Arguments Value Examples

View source: R/countCharOccurrences.R

Description

Counts the number of times a single characte occurs in each string of a character vector.

Usage

1
countCharOccurrences(char, v_s_string, b_ignore_case = FALSE)

Arguments

char

a single character cannot be a regular expression.

v_s_string

a character vector.

b_ignore_case

a boolean default FALSE. If TRUE case is ignored.

Value

a integer vector of the number of times the character occurs in each string in v_s_string.

Examples

1
2
3
countCharOccurrences("a", c("a other a", "zero"))
countCharOccurrences("a", c("A sentence."))
countCharOccurrences("a", c("A sentence."), b_ignore_case = TRUE)

AlejandroKantor/akmisc documentation built on May 5, 2019, 3:51 a.m.