find_section: Detect section headers in plain text journal articles

Description Usage Arguments Value

View source: R/detect_sections.R

Description

Given a plain text journal article and a named section header, detects which line is most likely to be the section header. For example, section="methods" will return the line containing a header such as "Materials and Methods".

Usage

1
find_section(section, text)

Arguments

section

A string of length 1 naming the section to detect; options are introduction, methods, results, discussion, and references.

text

A character vector containing the plain text of a journal article where each line represents one paragraph separated by line breaks.

Value

An integer containing the line number of the text that is most likely the start of the section.


ESHackathon/doi2txt documentation built on Dec. 17, 2021, 5:39 p.m.