inspect_text function

Inspect Text Vectors

Inspect Text Vectors

inspect_text - Inspect a text vector with adjustable string wrapping; created a pretty printed named list.

inspect_text(text.var, grouping.var = NULL, ...) ## Default S3 method: inspect_text(text.var, grouping.var = NULL, ...) ## S3 method for class 'Corpus' inspect_text(text.var, ...)

Arguments

  • text.var: The text variable or a wfm object.
  • grouping.var: The grouping variables. Default NULL generates one word list for all text. Also takes a single grouping variable or a list of 1 or more grouping variables.
  • ``: ignored.

Returns

Returns a named list (prints pretty).

Examples

## Not run: with(raj, inspect_text(dialogue)) with(raj, inspect_text(dialogue, person)) with(raj, inspect_text(dialogue, list(paste("Act", act), person))) ## With a tm Corpus object library(tm) data(crude) inspect_text(crude) ## End(Not run)
  • Maintainer: Tyler Rinker
  • License: GPL-2
  • Last published: 2023-05-11