lexical_dispersion: Lexical Dispersion

Description Usage Arguments Value Note Examples

Description

Generate a lexical dispersion dataset (location of terms). Typically the user will want to use lexical_dispersion_plot directly but this allows the return of the data that generates the plot.

Usage

1
2
lexical_dispersion(text.var, term.list, grouping.var = NULL, rm.var = NULL,
  group.names, time.names, ignore.case = TRUE, ...)

Arguments

text.var

The text variable.

term.list

A vector of quoted terms or a named list of quoted terms. If the latter terms will be combined into a single unified theme named according to the list names. Note that terms within the vectors of the list cannot be duplicated.

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.

rm.var

The repeated measures variables. Default NULL generates one facet for all text. Also takes a single repeated measures variable or a list of 1 or more grouping variables.

group.names

A vector of names that corresponds to group.var. Generally for internal use.

time.names

A vector of names that corresponds to rm.var. Generally for internal use.

ignore.case

logical. If TRUE matching will be done without regard to case.

...

Ignored.

Value

Returns dispersion plot data (location of the terms) and default plots the dispersion plot.

Note

The match.terms is character sensitive. Spacing is an important way to grab specific words and requires careful thought. Using "read" will find the words "bread", "read" "reading", and "ready". If you want to search for just the word "read" you'd supply a vector of c(" read ", " reads", " reading", " reader").

Examples

1
2
x <- lexical_dispersion(sam_i_am, c(' not ', ' eat ', ' sam ', ' (sam|eat) '))
plot(x)

trinker/textplot documentation built on May 29, 2019, 1:38 p.m.