| get_net_cooccur_igraph | R Documentation |
get_net_cooccur_igraph() returns a play network, given play and corpus
names. Play network is constructed based on characters' co-occurrence matrix.
Each node (vertex) is a character (circle) or a group of characters (square),
edges width is proportional to the number of common play segments where two
characters occur together.
get_net_cooccur_igraph(play = NULL, corpus = NULL, as_igraph = FALSE)
## S3 method for class 'cooccur_igraph'
plot(
x,
layout = igraph::layout_with_kk,
vertex.label = label_cooccur_igraph(x),
gender_colors = c(MALE = "#0073C2", FEMALE = "#EFC000", UNKNOWN = "#99979D"),
vertex_size_metric = c("numOfWords", "numOfScenes", "numOfSpeechActs", "degree",
"weightedDegree", "closeness", "betweenness", "eigenvector"),
vertex_size_scale = c(5, 20),
edge_size_scale = c(0.5, 4),
vertex_label_adjust = TRUE,
vertex.label.color = "#03070f",
vertex.label.family = "sans",
vertex.label.font = 2L,
vertex.frame.color = "white",
...
)
## S3 method for class 'cooccur_igraph'
summary(object, ...)
play |
Character, name of a play (you can find all play names in
|
corpus |
Character, name of the corpus (you can find all corpus names in
|
as_igraph |
Logical, if |
x |
A |
layout |
Function, an algorithm used for the graph layout. See igraph.plotting. |
vertex.label |
Character vector of character names. By default,
function |
gender_colors |
Named character vector with 3 colors for the
|
vertex_size_metric |
Character value, one of |
vertex_size_scale |
Numeric vector with two values. The first number is
the size of the smallest vertex, the second one defines how much bigger the
other vertices are: the size of a vertex is
|
edge_size_scale |
Numeric vector with two values. The first number is
the width of the thinnest edge, the second one defines how much thicker the
other edges are: the width of an edge is
|
vertex_label_adjust |
Logical. If |
vertex.label.color |
See igraph.plotting. |
vertex.label.family |
See igraph.plotting. |
vertex.label.font |
See igraph.plotting. |
vertex.frame.color |
See igraph.plotting. |
... |
Other arguments to be passed to plot.igraph |
object |
An object of class |
cooccur_igraph — an object that inherits igraph and can be
treated as such.
plot(cooccur_igraph): Plot cooccur_igraph using
plot.igraph with slightly modified defaults.
summary(cooccur_igraph): Meaningful summary for
"cooccur_igraph" object: network properties, sex distribution
get_net_relations_igraph
label_cooccur_igraph
emilia_igraph <- get_net_cooccur_igraph(
play = "lessing-emilia-galotti",
corpus = "ger"
)
igraph::diameter(emilia_igraph)
plot(emilia_igraph)
plot(emilia_igraph,
gender_colors = c(MALE = "steelblue", FEMALE = "tomato", UNKNOWN = "grey70")
)
summary(emilia_igraph)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.