get_net_relations_igraph {rdracor} | R Documentation |
Retrieve an igraph relations network for a play
Description
get_net_relations_igraph()
a play network, given play and corpus names
. The network represent kinship and other relationships data, following the
encoding scheme proposed in
(Wiedmer et al. 2020).
Usage
get_net_relations_igraph(play = play, corpus = corpus, as_igraph = FALSE)
## S3 method for class 'relations_igraph'
summary(object, ...)
## S3 method for class 'relations_igraph'
plot(
x,
layout = igraph::layout_nicely,
gender_colors = c(MALE = "#0073C2", FEMALE = "#EFC000", UNKNOWN = "#99979D"),
show_others = c("vertex", "vertex_label", "none"),
vertex_size = c(13, 4),
vertex_label_size = c(0.8, 0.5),
vertex_label_adjust = TRUE,
vertex.label.color = "#03070f",
vertex.label.family = "sans",
vertex.label.font = 2L,
vertex.frame.color = "white",
edge.arrow.size = 0.25,
edge.arrow.width = 1.5,
edge.curved = 0.15,
edge.label.family = "sans",
edge.label.font = 4L,
edge.label.cex = 0.75,
...
)
Arguments
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 |
object |
An object of class |
... |
Other arguments to be passed to plot.igraph |
x |
A |
layout |
Function, an algorithm used for graph layout. See layout_. |
gender_colors |
Named vector with 3 values with colors for
MALE, FEMALE and UNKNOWN respectively. Set |
show_others |
Character value. What to do with vertices without relations?
The default is |
vertex_size |
Numeric vector with two values. The first number is for nodes with relations, the second number is for all other nodes. |
vertex_label_size |
Numeric vector with two values. The first number defines label sizes for nodes with relations, the second number for nodes without relations. |
vertex_label_adjust |
Logical value. 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. |
edge.arrow.size |
See igraph.plotting. |
edge.arrow.width |
See igraph.plotting. |
edge.curved |
See igraph.plotting. |
edge.label.family |
See igraph.plotting. |
edge.label.font |
See igraph.plotting. |
edge.label.cex |
See igraph.plotting. |
Value
relations_igraph
— an object that inherits igraph
and
can be treated as such.
Functions
-
summary(relations_igraph)
: Meaningful summary for"relations_igraph"
object: relationships and their type. -
plot(relations_igraph)
: Plotrelations_igraph
usingplot.igraph
with slightly modified defaults.
References
Wiedmer N, Pagel J, Reiter N (2020). “Romeo, Freund des Mercutio: Semi-Automatische Extraktion von Beziehungen zwischen dramatischen Figuren.” In Konferenz Digital Humanities im deutschsprachigen Raum. doi:10.5281/zenodo.4621778.
See Also
Examples
galotti_relations <- get_net_relations_igraph(
play = "lessing-emilia-galotti",
corpus = "ger"
)
plot(galotti_relations)
summary(galotti_relations)