Learn R Programming

qdap (version 2.3.0)

inspect_text: Inspect Text Vectors

Description

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

inspect_text.default - Default method for inspect_text used to convert to a vector to a pretty printed named list.

inspect_text.Corpus - Corpus method for inspect_text used to convert to a Corpus.

Usage

inspect_text(text.var, grouping.var = NULL, ...)

# S3 method for default inspect_text(text.var, grouping.var = NULL, ...)

# S3 method for 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.

Value

Returns a named list (prints pretty).

Examples

Run this code
# 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)
# }

Run the code above in your browser using DataLab