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)

is_aperiodic(object, max_path_length = 4)

is_perfect_matching(object, mark = "type")

is_eulerian(object)

Source

https://stackoverflow.com/questions/55091438/r-igraph-find-all-cycles

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

max_path_length

Maximum path length considered. If negative, paths of all lengths are considered. By default 4, to avoid potentially very long computation times.

mark

A logical vector marking two types or modes. By default "type".

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

  • is_aperiodic(): Tests whether network is aperiodic

  • is_perfect_matching(): Tests whether there is a matching for a network that covers every node in the network

  • is_eulerian(): Tests whether there is a Eulerian path for a network where that path passes through every tie exactly once @importFrom igraph has_eulerian_path

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
is_aperiodic(ison_algebra)
#> [1] TRUE
is_perfect_matching(ison_southern_women)
#> [1] FALSE
is_eulerian(ison_brandes)
#> [1] FALSE