one-row-per-network summary of a netify object (broom style)
Source:R/broom_methods.R
glance.netify.Rdglance.netify is an s3 method for the glance() generic from the
broom package. it returns the graph-level statistics produced
by summary.netify() – one row per network / time period / layer –
so the netify object plays nicely with broom-style workflows. (broom
is not a hard dependency; this method is registered as an s3 method
on glance and only triggers when the generic is available.)
Arguments
- x
a netify object.
- ...
additional arguments passed to
summary.netify()(e.g.,other_stats = list(my_stat = my_fn)).
Value
a tibble (or data.frame if tibble isn't installed): one row
per (network, time, layer) combination with density, reciprocity,
mutual, transitivity, edge counts, etc.
See also
summary.netify() for the underlying summary, and tidy.netify
for one-row-per-edge output.
Examples
data(icews)
icews_10 <- icews[icews$year == 2010, ]
net <- netify(icews_10, actor1 = "i", actor2 = "j",
symmetric = FALSE, weight = "verbCoop")
glance.netify(net)
#> # A tibble: 1 × 18
#> net num_actors density num_edges prop_edges_missing mean_edge_weight
#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 1 152 0.435 9976 0 41.7
#> # ℹ 12 more variables: sd_edge_weight <dbl>, median_edge_weight <dbl>,
#> # min_edge_weight <dbl>, max_edge_weight <dbl>, competition_row <dbl>,
#> # competition_col <dbl>, sd_of_row_means <dbl>, sd_of_col_means <dbl>,
#> # covar_of_row_col_means <dbl>, reciprocity <dbl>, mutual <dbl>,
#> # transitivity <dbl>