qdap (version 2.4.3)

object_pronoun_type: Count Object Pronouns Per Grouping Variable

Description

Count the number of object pronouns per grouping variables.

Usage

object_pronoun_type(
  text.var,
  grouping.var = NULL,
  object.pronoun.list = NULL,
  ...
)

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.

object.pronoun.list

A named list of object pronouns. See Details for more.

Other arguments passed to termco

Value

Returns a list, of class "object_pronoun_type", of data frames regarding object pronoun word counts:

preprocessed

List of uncollapsed dataframes (raw, prop, rnp) of the class "termco" that contain all searchable object pronouns.

raw

raw word counts by grouping variable

prop

proportional word counts by grouping variable; proportional to each individual's object pronoun use

rnp

a character combination data frame of raw and proportional object pronoun use

Details

The following object pronoun categories are the default searched terms:

  • me = c(" me ", " my ", " mine ")

  • us = c(" us ", " our ", " ours ")

  • you = c(" you'd ", " you'll ", " you're ", " you've ", " you ", " your ")

  • him = c(" him ", " his ")

  • her = c(" her ", " hers ")

  • them = c(" them ")

  • their = c(" their ", "theirs ")

  • it = c(" it'd ", " it'll ", " it's ", " it ")

See Also

subject_pronoun_type, pronoun_type

Examples

Run this code
# NOT RUN {
dat <- pres_debates2012
dat <- dat[dat$person %in% qcv(ROMNEY, OBAMA), ]
(out <- object_pronoun_type(dat$dialogue, dat$person))
plot(out)
plot(out, 2)
plot(out, 3)
plot(out, 3, ncol=2)

scores(out)
counts(out)
proportions(out)
preprocessed(out)

plot(scores(out))
plot(counts(out))
plot(proportions(out))
# }

Run the code above in your browser using DataCamp Workspace