Learn R Programming

politeness (version 0.2.2)

dictWrap: Dictionary Wrapper

Description

background function to load

Usage

dictWrap(text, dict = NULL, binary = FALSE,
  num_mc_cores = parallel::detectCores(), ...)

Arguments

text

a character vector of texts.

dict

a dictionary class object (see dictionary) containing dictionaries for six of the politeness features

binary

return the prevalence (percent of words) or the presence (yes/no) of a feature in each text?

...

arguments passes onto the quanteda:dfm function

Value

a matrix with six columns (one for each feature) and a row for every text entered into the function.