Learn R Programming

SherlockHolmes (version 1.0.2)

lengths: lengths

Description

frequencies plotted in order of story length

Usage

lengths(titles.vec, patterns, starts, freqs, lengthDir)

Value

returns no value, but has side effect generating graph

Arguments

titles.vec

character vector containing the titles of the stories

patterns

vector of character string query patterns

starts

integer vector of starting positions

freqs

return value of frequency()

lengthDir

character string full path name for output directory

Examples

Run this code
freqDir<-tempdir()
lengthDir<-sprintf("%s/length",freqDir)
dir.create(lengthDir)
print(lengthDir)
dir.create(sprintf("%s/plots",lengthDir))
dir.create(sprintf("%s/archive",lengthDir))
le<-lengths(titles.vec,patterns,starts,freqs,lengthDir)

Run the code above in your browser using DataLab