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_nathalie_2020_4621778rdracor.
get_net_relations_igraph(play = play, corpus = corpus, as_igraph = FALSE)# S3 method for relations_igraph
summary(object, ...)
# S3 method for 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,
...
)
relations_igraph
— an object that inherits igraph
and
can be treated as such.
Character, name of a play (you can find all play names in
"playName"
column within an object returned by
get_dracor
). Character vector (longer than 1) is not
supported.
Character, name of the corpus (you can find all corpus names in
name
column within an object returned by
get_dracor_meta
).
Logical, if TRUE
, returns simple igraph object
instead of cooccur_igraph
. FALSE
by default.
An object of class relations_igraph
.
Other arguments to be passed to plot.igraph
A relations_igraph
object to plot.
Function, an algorithm used for graph layout. See layout_.
Named vector with 3 values with colors for
MALE, FEMALE and UNKNOWN respectively. Set NULL
to use default igraph
colors. If you set parameter vertex.color
(see
igraph.plotting), gender_colors
will be ignored.
Character value. What to do with vertices without relations?
"vertex"
: plot only vertices without labels.
"vertex_label"
: plot both vertices and labels.
"none"
: do not plot vertices without relations.
The default is "vertex"
.
Numeric vector with two values. The first number is for nodes with relations, the second number is for all other nodes.
Numeric vector with two values. The first number defines label sizes for nodes with relations, the second number for nodes without relations.
Logical value. If TRUE
, labels positions
are moved to the top of the respective nodes. If FALSE
, labels
are placed in the nodes centers. TRUE
by default. If you set parameter
vertex.label.dist
(see igraph.plotting) by yourself,
vertex_label_adjust
is ignored.
See igraph.plotting.
See igraph.plotting.
See igraph.plotting.
See igraph.plotting.
See igraph.plotting.
See igraph.plotting.
See igraph.plotting.
See igraph.plotting.
See igraph.plotting.
See igraph.plotting.
summary(relations_igraph)
: Meaningful summary for
"relations_igraph"
object: relationships and their type.
plot(relations_igraph)
: Plot relations_igraph
using
plot.igraph
with slightly modified defaults.
get_net_cooccur_igraph
# \donttest{
galotti_relations <- get_net_relations_igraph(
play = "lessing-emilia-galotti",
corpus = "ger"
)
plot(galotti_relations)
summary(galotti_relations)
# }
Run the code above in your browser using DataLab