make_tidy_text_stm_ready: make an stm::prepDocuments() object ready for stm::stm

View source: R/make_tidy_text_stm_ready.R

make_tidy_text_stm_readyR Documentation

make an stm::prepDocuments() object ready for stm::stm

Description

get a pre-processed stm::prepDocuments() object ready for use in stm::stm(). This function allows for the expedition of preparing a tidy text object for use in stm::stm()

Usage

make_tidy_text_stm_ready(tidy_train_text_obj)

Arguments

tidy_train_text_obj

the "tidy text" object that is to be processed. see https://juliasilge.com/blog/evaluating-stm/

Value

a list object containing "documents", "vocab", "meta", etc,. typically returned by stm::prepDocuments()

Examples

## Not run: 
data("tm_ex_dat")

tidy_train_text <- tm_ex_dat$tidy_train_text

nested_dat <- tm_ex_dat$nested_tidy_train_text

make_tidy_text_stm_ready(tidy_train_text)

## End(Not run)

tknoch8/topicHelpers documentation built on Nov. 11, 2023, 1:15 a.m.