unique_by: Find Unique Words by Grouping Variable

Description Usage Arguments Value Examples

View source: R/unique_by.R

Description

Find unique words used by grouping variable.

Usage

1
unique_by(text.var, grouping.var)

Arguments

text.var

The text variable

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.

Value

Returns a list of unique words by grouping variable.

Examples

1
2
3
4
5
6
7
8
## Not run: 
dat <- pres_debates2012[pres_debates2012$time == "time 3", ]
with(dat, unique_by(dialogue, person))
with(pres_debates2012, unique_by(dialogue, list(time, person)))

with(DATA, unique_by(state, person))

## End(Not run)

trinker/qdap documentation built on Sept. 30, 2020, 6:28 p.m.