node_x_exposure() produces a motif matrix of nodes' exposure to infection/adoption by time step.

node_x_exposure(.data)

Arguments

.data

A network object of class mnet, igraph, tbl_graph, network, or similar. For more information on the standard coercion possible, see manynet::as_tidygraph().

Value

A node_motif matrix with one row for each node in the network and a column for each motif type, giving the count of each motif in which each node participates. It is printed as a tibble, however, to avoid greedy printing. If the network is labelled, then the node names will be in a column named names.

Examples

node_x_exposure(play_diffusion(create_tree(12)))
#> # A tibble: 12 × 4
#>      t0    t1    t2    t3
#>   <dbl> <dbl> <dbl> <dbl>
#> 1     0     2     2     2
#> 2     1     1     3     3
#> 3     1     1     3     3
#> 4     0     1     1     3
#> 5     0     1     1     3
#> 6     0     1     1     2
#> # ℹ 6 more rows