frequency {SherlockHolmes}R Documentation

frequency

Description

compute ratio of number of occurrences of query string divided by total number of words

Usage

frequency(texts.vec, starts, patterns)

Arguments

texts.vec

character vector of entire text

starts

integer vector of starting positions

patterns

vector of character string query patterns

Value

a list whose components are sub-lists

# indexed by the titles of the stories

Examples

fr<-frequency(texts.vec,starts,patterns)

[Package SherlockHolmes version 1.0.1 Index]