Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

split_by_doc_id

Turn a multi-document kRp.text object into a list of kRp.text objects


Description

For some analysis steps it might be important to have individual tagged texts instead of one large corpus object. This method produces just that.

Usage

split_by_doc_id(obj, keepFeatures = TRUE)

## S4 method for signature 'kRp.text'
split_by_doc_id(obj, keepFeatures = TRUE)

Arguments

obj

An object of class kRp.text.

keepFeatures

Either logical, whether to keep all features or drop them, or a character vector of names of features to keep if present.

Value

A named list of objects of class kRp.text. Elements are named by their doc_id.

Examples

## Not run: 
myCorpusList <- split_by_doc_id(myCorpus)

## End(Not run)

koRpus

Text Analysis with Emphasis on POS Tagging, Readability, and Lexical Diversity

v0.13-6
GPL (>= 3)
Authors
Meik Michalke [aut, cre], Earl Brown [ctb], Alberto Mirisola [ctb], Alexandre Brulet [ctb], Laura Hauser [ctb]
Initial release
2021-05-08

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.