
Last chance! 50% off unlimited learning
Sale ends in
word_network_plot(text.var, grouping.var = 1:length(text.var),
target.words = NULL, stopwords = qdapDictionaries::Top100Words,
label.cex = 0.8, label.size = 0.5, edge.curved = TRUE,
vertex.shape = "circle", edge.color = "gray70", label.colors = "black",
layout = NULL, title.name = NULL, title.padj = -4.5,
title.location = 3, title.font = NULL, title.cex = 0.8,
log.labels = FALSE, title.color = "black", legend = NULL,
legend.cex = 0.8, legend.location = c(-1.54, 1.41), plot = TRUE,
char2space = "~~", ...)
label.colors
(+1 length in cloud colors for non-matched terms).TRUE
.TRUE
edges will be curved rather than
straight paths.igraph.vertex.shapes
for more).layout
.NULL
and
NA
are equivalent to 1.0.TRUE
uses a proportional log label for
more readable labels. The formula is: log(SUMS)/max(log(SUMS)))
.
label.size
adds more control over the label sizes.match.string
.NULL
and NA
are equivalent to 1.0."bottomright"
, "bottom"
,
"bottomleft"
, "left"
TRUE
plots a network plot of the words.char.keep
is NULL
, char2space
will activate this
argument.strip
.word_network_plot
,
graph.adjacency
word_network_plot(text.var=DATA$state)
word_network_plot(text.var=DATA$state, stopwords=NULL)
word_network_plot(text.var=DATA$state, DATA$person)
word_network_plot(text.var=DATA$state, DATA$person, stopwords=NULL)
word_network_plot(text.var=DATA$state, grouping.var=list(DATA$sex,
DATA$adult))
word_network_plot(text.var=DATA$state, grouping.var=DATA$person,
title.name = "TITLE", log.labels=TRUE)
word_network_plot(text.var=raj.act.1$dialogue, grouping.var=raj.act.1$person,
stopwords = Top200Words)
#insert double tilde ("~~") to keep dual words (e.g., first last name)
alts <- c(" fun", "I ")
state2 <- mgsub(alts, gsub("\\s", "~~", alts), DATA$state)
word_network_plot(text.var=state2, grouping.var=DATA$person)
## Invisibly returns the igraph model
x <- word_network_plot(text.var=DATA$state, DATA$person)
str(x)
library(igraph)
plot(x, vertex.size=0, vertex.color="white", edge.curved = TRUE)
x2 <- word_network_plot(text.var=DATA$state, grouping.var=DATA$person,
title.name = "TITLE", log.labels = TRUE, label.size = 1.2)
l <- layout.drl(x2, options=list(simmer.attraction=0))
plot(x2, vertex.size=0, layout = l)
Run the code above in your browser using DataLab