Learn R Programming

baseq (version 0.2.0)

count_pattern: Count Pattern

Description

Counts the occurrences of a specific pattern in a sequence.

Usage

count_pattern(s, p)

Value

Integer count of occurrences

Arguments

s

A character string containing the sequence

p

A character string containing the pattern to count

Examples

Run this code
data(sars_fragment)
count_pattern(sars_fragment, "ATTA")

Run the code above in your browser using DataLab