These functions implement logical tests for various network properties.

is_migraph(object)

is_graph(object)

is_edgelist(object)

is_twomode(object)

is_weighted(object)

is_directed(object)

is_labelled(object)

is_signed(object)

is_connected(object)

is_complex(object)

is_multiplex(object)

is_uniplex(object)

is_acyclic(object)

Arguments

object

An object of a migraph-consistent class:

  • matrix (adjacency or incidence) from {base} R

  • edgelist, a data frame from {base} R or tibble from {tibble}

  • igraph, from the {igraph} package

  • network, from the {network} package

  • tbl_graph, from the {tidygraph} package

Value

TRUE if the condition is met, or FALSE otherwise.

Functions

  • is_migraph: Tests whether network is migraph-compatible

  • is_graph: Tests whether network contains graph-level information

  • is_edgelist: Tests whether data frame is an edgelist

  • is_twomode: Tests whether network is a two-mode network

  • is_weighted: Tests whether network is weighted

  • is_directed: Tests whether network is directed

  • is_labelled: Tests whether network includes names for the nodes

  • is_signed: Tests whether network is signed positive/negative

  • is_connected: Tests whether network is weakly connected if the network is undirected or strongly connected if directed. To test weak connection on a directed network, please see to_undirected().

  • is_complex: Tests whether network contains any loops

  • is_multiplex: Tests whether network is multiplex, either from multiple rows with the same sender and receiver, or multiple columns to the edgelist.

  • is_uniplex: Tests whether network is simple (both uniplex and simplex)

  • is_acyclic: Tests whether network is a directed acyclic graph

See also

Other marks: mark_nodes, mark_ties

Examples

is_twomode(ison_southern_women)
#> [1] TRUE
is_weighted(ison_southern_women)
#> [1] FALSE
is_directed(ison_algebra)
#> [1] TRUE
is_labelled(ison_southern_women)
#> [1] TRUE
is_signed(ison_southern_women)
#> [1] FALSE
is_connected(ison_southern_women)
#> [1] TRUE
is_complex(ison_southern_women)
#> [1] FALSE
is_uniplex(ison_algebra)
#> [1] TRUE
is_acyclic(ison_algebra)
#> [1] FALSE