get_breaks: Break text by line matching

Description Usage Arguments Note Examples

Description

This function matches a vector of break point strings with lines from a larger text and returns the line/index numbers of the matched strings in the larger text.

Usage

1
get_breaks(text, breaks)

Arguments

text

Character vector containing all the lines in a given text

breaks

Lines to be matched in the text

Note

The breaks argument can be fragments of the lines that are to be matched and indexed in the larger text argument.

Examples

1
2
3
breakpoints <- c("Shall we sit here?", "“No, not now,” 
               said the girl. “Not here, I can’t.”")
get_breaks(text = gardenParty, breaks = breakpoints)

Amherst-Statistics/katherinemansfieldr documentation built on May 5, 2019, 4:55 a.m.