mode_addition: Add actor and event nodes

Description Usage Arguments See Also Examples

Description

These functions add actor and event nodes (as desired) to a graph while maintaining its (temporal) affiliation network structure.

Usage

1
2
3
4
5
add_modes(graph, mode = 1, nv, ..., attr = list(), affiliations = NULL)

add_actors(graph, nv, ..., attr = list(), events = NULL)

add_events(graph, nv, ..., attr = list(), actors = NULL)

Arguments

graph

An affiliation network.

mode

Numeric or character; whether to project onto actors (1 or "actors") or onto events (2 or "events").

nv, ..., attr

Arguments passed to add_vertices. Events added to a dynamic affiliation network should be given time attributes.

affiliations

A vector, or list of length nv of vectors, of nodes in graph of mode not mode, to be linked to the new node(s).

events

A vector, or list of length nv of vectors, of event nodes in graph, to be linked to the new actor(s).

actors

A vector, or list of length nv of vectors, of actor nodes in graph, to be linked to the new event(s).

See Also

Original igraph functions: add_vertices, add_edges

Other modal queries and manipulations: dualize, mode_counts, modes, schedule

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
data(women_clique)
plot(prettify_an(add_actors(women_clique, nv = 1, events = c(7, 9))))
data(women_group)
plot(prettify_an(women_group))
actor_names <- c("Frances", "Dorothy")
cbind(
  dynamic_triad_closure(women_group, type = "local"),
  dynamic_triad_closure(
    add_events(women_group, nv = 1, actors = actor_names, time = 0),
    type = "local"
  ),
  dynamic_triad_closure(
    add_events(women_group, nv = 1, actors = actor_names, time = 367),
    type = "local"
  )
)

corybrunson/bitriad documentation built on May 13, 2019, 10:51 p.m.