Extract section text from Rmd
extract_section_text(rmd_name, hdr_pat, ignore_case = TRUE)Returns a character vector containing all the text written in the section that begins with the specified pattern.
The pattern should pick up a unique section/sub-section/sub-sub-section. Otherwise, it will stop and raise an error.
The filename of the Rmd script.
The regular expression pattern to pick up the section title.
A boolean - whether or not to ignore case when matching for the section title.
The text that is picked up begins with the specified section, and ends with the next string of pound symbols (#)