Learn R Programming

qdap (version 2.4.6)

unique_by: Find Unique Words by Grouping Variable

Description

Find unique words used by grouping variable.

Usage

unique_by(text.var, grouping.var)

Value

Returns a list of unique words by grouping variable.

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.

Examples

Run this code
if (FALSE) {
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))
}

Run the code above in your browser using DataLab