Skip to contents

This assigns colors based on frequency to the words in the transcript.

Usage

collocation_plot(
  frequency_doc,
  colors = c("#f251fc", "#f8ff1b"),
  values = "Freq",
  order = "word_num",
  text = "words"
)

Arguments

frequency_doc

document of frequencies (returned from collocation_frequency())

colors

list for color specification for the gradient. Default is c("#f251fc","#f8ff1b")

values

column name of values to use in gradient calculation. Default is "Freq", corresponding to document returned from collocation_frequency()

order

column name corresponding to the the word order of the text. Default is "word_num", corresponding to the document returned from collocation_frequency()

text

column name corresponding to text to map the gradient to. Default is "words", corresponding to the document returned from collocation_frequency()

Value

list of plot, plot object, and frequency

Examples

# Identify Source Row
src_row <- which(notepad_example$ID=="source")
merged_frequency <- collocation_frequency(notepad_example, src_row, "Text")
# Create a plot object to assign colors based on frequency
freq_plot <- collocation_plot(merged_frequency)