Skip to contents

s3 method for tibble::as_tibble(). returns the same long-format frame as unnetify() / tidy.netify(), wrapped in a tibble for tidyverse-pipe friendliness.

Usage

as_tibble.netify(x, ...)

Arguments

x

a netify object.

...

passed to unnetify() (e.g., remove_zeros = TRUE).

Value

a tibble (or data.frame if tibble isn't installed) with one row per dyad. includes from, to, optional time/layer, the edge weight, dyadic covariates, and nodal covariates merged in with _from / _to suffixes.

Details

registered against the tibble::as_tibble generic via .onload, so tibble is not a hard dependency. when tibble isn't installed, a plain data.frame is returned.

See also

tidy.netify() for the broom-style sibling and unnetify() for the underlying converter.

Author

cassy dorff, shahryar minhas

Examples

if (FALSE) { # \dontrun{
data(icews)
icews_10 <- icews[icews$year == 2010, ]
net <- netify(icews_10, actor1 = "i", actor2 = "j",
    symmetric = FALSE, weight = "verbCoop")
tibble::as_tibble(net)
} # }