These functions offer tools for joining lists of manynet-consistent objects (matrices, igraph, tidygraph, or network objects) into a single object.
from_subgraphs()
modifies a list of subgraphs into a single tidygraph.
from_egos()
modifies a list of ego networks into a whole tidygraph
from_waves()
modifies a list of network waves into a longitudinal tidygraph.
from_slices()
modifies a list of time slices of a network into
a dynamic tidygraph.
from_ties()
modifies a list of different ties into a multiplex tidygraph
from_subgraphs(netlist)
from_egos(netlist)
from_waves(netlist)
from_slices(netlist, remove.duplicates = FALSE)
from_ties(netlist, netnames)
A tidygraph object combining the list of network data.
Other modifications:
manip_as
,
manip_correlation
,
manip_deformat
,
manip_levels
,
manip_miss
,
manip_nodes
,
manip_paths
,
manip_permutation
,
manip_preformat
,
manip_project
,
manip_reformat
,
manip_scope
,
manip_split
,
manip_ties
ison_adolescents %>%
mutate(unicorn = sample(c("yes", "no"), 8, replace = TRUE)) %>%
to_subgraphs(attribute = "unicorn") %>%
from_subgraphs()
#> Joining with `by = join_by(name, unicorn)`
#> # A labelled, undirected network of 8 nodes and 5 ties
#>
#> ── Nodes
#> # A tibble: 8 × 2
#> name unicorn
#> <chr> <chr>
#> 1 Betty no
#> 2 Sue no
#> 3 Alice no
#> 4 Pam no
#> 5 Tina no
#> 6 Jane yes
#> # ℹ 2 more rows
#>
#> ── Ties
#> # A tibble: 5 × 2
#> from to
#> <int> <int>
#> 1 1 2
#> 2 2 3
#> 3 2 4
#> 4 3 4
#> 5 6 7
#>
ison_adolescents %>%
to_egos() %>%
from_egos()
#> # A labelled, directed network of 8 nodes and 10 arcs
#>
#> ── Nodes
#> # A tibble: 8 × 1
#> name
#> <chr>
#> 1 Betty
#> 2 Sue
#> 3 Alice
#> 4 Jane
#> 5 Pam
#> 6 Carol
#> # ℹ 2 more rows
#>
#> ── Ties
#> # A tibble: 10 × 2
#> from to
#> <int> <int>
#> 1 1 2
#> 2 2 3
#> 3 2 7
#> 4 3 7
#> 5 2 5
#> 6 3 5
#> # ℹ 4 more rows
#>
ison_adolescents %>%
mutate_ties(wave = sample(1:4, 10, replace = TRUE)) %>%
to_waves(attribute = "wave") %>%
from_waves()
#> # A longitudinal, labelled, directed network of 8 nodes and 10 arcs over 4
#> waves
#>
#> ── Nodes
#> # A tibble: 8 × 1
#> name
#> <chr>
#> 1 Alice
#> 2 Jane
#> 3 Pam
#> 4 Betty
#> 5 Sue
#> 6 Carol
#> # ℹ 2 more rows
#>
#> ── Ties
#> # A tibble: 10 × 3
#> from to wave
#> <int> <int> <int>
#> 1 1 2 1
#> 2 2 7 1
#> 3 3 6 1
#> 4 4 5 2
#> 5 5 7 2
#> 6 5 3 2
#> # ℹ 4 more rows
#>
ison_adolescents %>%
mutate_ties(time = 1:10, increment = 1) %>%
add_ties(c(1,2), list(time = 3, increment = -1)) %>%
to_slices(slice = c(5,7)) %>%
from_slices()
#> # A labelled, weighted, directed network of 5 nodes and 10 arcs
#>
#> ── Nodes
#> # A tibble: 5 × 1
#> name
#> <chr>
#> 1 Sue
#> 2 Alice
#> 3 Jane
#> 4 Dale
#> 5 Pam
#>
#> ── Ties
#> # A tibble: 10 × 3
#> from to weight
#> <int> <int> <dbl>
#> 1 1 2 1
#> 2 2 3 1
#> 3 1 4 1
#> 4 2 4 1
#> 5 1 2 1
#> 6 2 3 1
#> # ℹ 4 more rows
#>