Skip to contents

This function flags a list of igraph objects as an nvd object as defined in this package.

Usage

as_nvd(obj)

Arguments

obj

A list of igraph objects.

Value

An nvd object.

Examples

params <- list(n_dim = 1L, dim_size = 4L, order = 4L, p_rewire = 0.15)
out <- nvd(sample_size = 1L, model = "smallworld", !!!params)
#>  Calling the `tidygraph::play_smallworld()` function with the following arguments:
#> • n_dim: 1
#> • dim_size: 4
#> • order: 4
#> • p_rewire: 0.15
#> • loops: FALSE
#> • multiple: FALSE
as_nvd(out)
#> [[1]]
#> # A tbl_graph: 4 nodes and 6 edges
#> #
#> # An undirected simple graph with 1 component
#> #
#> # Node Data: 4 × 0 (active)
#> #
#> # Edge Data: 6 × 2
#>    from    to
#>   <int> <int>
#> 1     1     2
#> 2     2     3
#> 3     3     4
#> # ℹ 3 more rows
#> 
#> attr(,"class")
#> [1] "nvd"  "list"