This is the constructor for objects of class nvd
.
Arguments
- sample_size
An integer specifying the sample size.
- model
A string specifying the model to be used for sampling networks. All
tidygraph::play_
functions are supported. The model name corresponds to the name of the function without theplay_
prefix.- ...
Model parameters to be passed to the model function.
Value
A nvd
object which is a list of tidygraph::tbl_graph
objects.
Examples
params <- list(n_dim = 1L, dim_size = 4L, order = 4L, p_rewire = 0.15)
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
#> [[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"