View source: R/collocation_plot.R
| collocation_plot | R Documentation |
This assigns colors based on frequency to the words in the transcript.
collocation_plot(
frequency_doc,
colors = c("#f251fc", "#f8ff1b"),
values = "Freq",
order = "word_num",
text = "words"
)
frequency_doc |
document of frequencies (returned from
|
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 |
order |
column name corresponding to the the word order of the text. Default
is "word_num", corresponding to the document returned from |
text |
column name corresponding to text to map the gradient to. Default is "words",
corresponding to the document returned from |
list of plot, plot object, and frequency
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.