| plot.CoCA | R Documentation |
Plot CoCA
## S3 method for class 'CoCA'
plot(
x,
module = NULL,
min = 0.15,
max = 1,
label.cex = 1.2,
seed = 123,
main = NULL,
...
)
x |
CoCA object returned by |
module |
Integer, which schematic class to plot. Defaults to |
min |
edges with absolute weights under this value are not shown (default = 0.15) |
max |
highest weight to scale the edge widths too (default = 1) |
label.cex |
label size scaling factor (default = 1.2) |
seed |
random seed for layout reproducibility (default = 123) |
main |
title for plot (default = NULL) |
... |
Arguments to be passed to methods |
invisibly returns the igraph object
data(ft_wv_sample)
data(jfk_speech)
jfk_speech$sentence <- tolower(jfk_speech$sentence)
jfk_speech$sentence <- gsub("[[:punct:]]+", " ", jfk_speech$sentence)
dtm <- dtm_builder(jfk_speech, sentence, sentence_id)
gen <- data.frame(pole1 = c("man", "new", "choose"), pole2 = c("nation", "world", "peace"))
space <- data.frame(pole1 = c("space", "moon", "science"), pole2 = c("nation", "world", "freedom"))
power <- data.frame(pole1 = c("great", "power", "new"), pole2 = c("peace", "freedom", "world"))
gen_dir <- get_direction(anchors = gen, wv = ft_wv_sample)
space_dir <- get_direction(anchors = space, wv = ft_wv_sample)
power_dir <- get_direction(anchors = power, wv = ft_wv_sample)
directions <- rbind(gen_dir, space_dir, power_dir)
classes <- CoCA(dtm, wv = ft_wv_sample, directions = directions)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.