Learn R Programming

SherlockHolmes (version 1.0.2)

startLine: startLine

Description

where does each story start?

Usage

startLine(titles.vec, texts.vec, toupper)

Value

an integer vector of the starting lines of each story

Arguments

titles.vec

is a character string containing the full path name for a text file containing the titles of the stories in the same order that they appear in the texts file

texts.vec

is a character string containing the full path name for a text file containing the full texts of all of the stories

toupper

is a Boolean TRUE if the titles should be converted to upper case

Details

each title in titles.vec must appear on a single line in titles.vec and texts.vec - a title cannot be split across multiple lines. each title must only appear one time within titles.vec and texts.vec

Examples

Run this code
sl<-startLine(titles.vec,texts.vec,toupper=TRUE)

Run the code above in your browser using DataLab