slices: An integer vector indicating the slices to subset
...: Further arguments passed to networkDynamic
diffnet2net.args: List of arguments passed to diffnet_to_network.
netdyn.args: List of arguments passed to networkDynamic
toavar: Character scalar. Name of the vertex attribute that holds the times of adoption.
graph.list: A list of network objects.
t0: Integer scalar. Passed to new_diffnet.
t1: Integer scalar. Passed to new_diffnet.
Returns
diffnet_to_network returns a list of length length(slices) in which each element is a network object corresponding a slice of the graph (diffnet object). The attributes list will include toa (time of adoption).
An object of class networkDynamic.
Details
diffnet_to_networkDynamic calls diffnet_to_network and uses the output to call networkDynamic, passing the resulting list of network objects as network.list (see networkDynamic).
By default, diffnet_to_networkDynamic passes net.obs.period as
By default, networkDynamic_to_diffnet uses the first slice as reference for vertex attributes and times of adoption.
By default, network_to_diffnet uses the first element of graph
(a list) as reference for vertex attributes and times of adoption.
Caveats
Since diffnet does not support edges attributes, these will be lost when converting from network-type objects. The same applies to network
attributes.
Examples
# Cohersing a diffnet to a list of networks ---------------------------------set.seed(1)ans <- diffnet_to_network(rdiffnet(20,2))ans
# and backnetwork_to_diffnet(graph.list = ans, toavar="toa")# If it was static, we can use -graph- insteadnetwork_to_diffnet(ans[[1]], toavar="toa")# A random diffusion network ------------------------------------------------set.seed(87)dn <- rdiffnet(50,4)ans <- diffnet_to_networkDynamic(dn)# and backnetworkDynamic_to_diffnet(ans, toavar ="toa")
See Also
Other Foreign: igraph, read_pajek(), read_ucinet_head()