Animate.polarity: Animate Polarity

Description Usage Arguments Details Note

View source: R/polarity.R

Description

Animate.polarity - Animate a polarity object.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## S3 method for class 'polarity'
Animate(
  x,
  negative = "blue",
  positive = "red",
  neutral = "yellow",
  edge.constant,
  wc.time = TRUE,
  time.constant = 2,
  title = NULL,
  digits = 3,
  width = 65,
  current.color = "black",
  current.speaker.color = NULL,
  non.speaker.color = NA,
  ave.color.line = "red",
  type = "network",
  coord = c(0, 0.5),
  just = c(0, 0.5),
  ...
)

Arguments

x

A polarity object.

negative

The color to use for negative polarity.

positive

The color to use for positive polarity.

neutral

The color to use for neutral polarity.

edge.constant

A constant to multiple edge width by.

wc.time

logical. If TRUE weights duration of frame by word count.

time.constant

A constant to divide the maximum word count by. Time is calculated by 'round(exp(WORD COUNT/(max(WORD COUNT)/time.constant)))'. Therefore a larger constant will make the difference between the large and small word counts greater.

title

The title to apply to the animated image(s).

digits

The number of digits to use in the current turn of talk polarity.

width

The width to break text at if type = "text".

current.color

The color to use for the current turn of talk polarity.

current.speaker.color

The color for the current speaker.

non.speaker.color

The color for the speakers not currently speaking.

ave.color.line

The color to use for the average color line if type = "network".

type

Character string of either "network" (as a network plot), "bar" (as a bar plot), or "text" (as a simple colored text plot).

coord

The x/y coordinate to plot the test if type = "text".

just

The hjust and vjust values to use for the text if type = "text".

...

Other arguments passed to discourse_map or annotate if type = "text".

Details

polarity Method for Animate

Note

The width of edges is based on words counts on that edge until that moment divided by total number of words used until that moment. Thicker edges tend to thin as time passes. The actual duration the current edge stays as the current.color is based on word counts for that particular flow of dialogue divided by total dialogue (words) used. The edge label is the current polarity for that turn of talk (an aggregation of the sub sentences of the current turn of talk). The coloring of the current edge polarity is produced at th sentence level, therefor a label may indicate a positive current turn of talk, while the coloring may indicate a negative sentences.


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