powered by
Coercion between graph classes
diffnet_to_igraph(graph, slices = 1:nslices(graph))igraph_to_diffnet( graph = NULL, graph.list = NULL, toavar, t0 = NULL, t1 = NULL, ... )
igraph_to_diffnet( graph = NULL, graph.list = NULL, toavar, t0 = NULL, t1 = NULL, ... )
Either a list of length(slices)
length(slices)
igraph
(diffnet_to_igraph), or a diffnet object (igraph_to_diffnet) objects.
diffnet_to_igraph
diffnet
igraph_to_diffnet
Either a diffnet or igraph graph object.
An integer vector indicating the slices to subset.
A list of igraph objects.
Character scalar. Name of the attribute that holds the times of adoption.
Integer scalar. Passed to new_diffnet.
new_diffnet
Further arguments passed to as_diffnet.
as_diffnet
Other Foreign: network, read_pajek(), read_ucinet_head()
network
read_pajek()
read_ucinet_head()
# Reading the medical innovation data into igraph -------------------------- x <- diffnet_to_igraph(medInnovationsDiffNet[,,1:4]) # Fetching the times of adoption igraph::vertex_attr(x[[1]], "toa")
Run the code above in your browser using DataLab