R/funcs.R
titleFlattener.Rd
This is suitable for when you have a long text and you're trying to do some NLP on it. Some examples might be: trying to digest documentation, analyzing documentation, converting to a table format something that should have never been entered into word, etc.
titleFlattener(text, titleChar)
text | the character string containing everything you're looking for. |
---|---|
titleChar | what unique character denotes a title? |
returns a data frame with the erstwhile titles pushed into each row
DETAILS
if (FALSE) { if(interactive()){ #EXAMPLE1 text <- c("## First","one","however","two","","## Second","otheer"," - Happy","Thoughts") titleFlattener(text, "##") } }