titleFlattener: Given a text with titles, it returns a df with each line with...

titleFlattenerR Documentation

Given a text with titles, it returns a df with each line with it's accompanying title

Description

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.

Usage

titleFlattener(text, titleChar)

Arguments

text

the character string containing everything you're looking for.

titleChar

what unique character denotes a title?

Details

DETAILS

Value

returns a data frame with the erstwhile titles pushed into each row

Examples

 text <- c("## First","one","however","two","","## Second","otheer"," - Happy","Thoughts")
 titleFlattener(text, "##")

DataStrategist/amitFuncs documentation built on June 4, 2022, 10:01 a.m.