Skip to contents

netify_check() validates only class membership. validate_netify() goes further: it verifies that the netify's internal pieces still agree with each other after any user-side surgery (e.g., manually edited attr(., "nodal_data"), subset() followed by an attribute overwrite, etc.). Use this when you've hand-modified a netlet and want to confirm it's still well-formed before passing to to_statnet() / to_amen() / plot().

Usage

validate_netify(netlet, verbose = TRUE)

Arguments

netlet

A netify object.

verbose

Logical. If TRUE (default), print a per-check status banner; otherwise return silently.

Value

Invisibly returns a list with one logical per check (TRUE = passed). The function cli::cli_abort()s on any failure unless verbose = TRUE, in which case failures are reported per-check and the function returns invisibly with the full failure list.

Author

Cassy Dorff, Shahryar Minhas

Examples

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