Take a text document containing coded text of the form: "stuff to ignore (QCODE) coded text we care about (/QCODE)#qcode more stuff to ignore" and turn it into a dataframe with one row per coded item, of the form: docid,qcode,text
parse_qcodes(x, ...)
x | A data frame containing the text to be coded; requires columns "doc_id" and "document_text" |
---|---|
... | Other parameters optionally passed in |
Replaces newline characters with "<br>" in the captured text returns an empty dataframe (no rows) if no qcodes were found.