Check if the network is something specific.

is_network(x)

is_igraph(x)

Arguments

x

graph object

Value

logical, TRUE or FALSE

Details

Check for various "identities" of the input object

Functions

  • is_network(): Check whether a graph is of class network

  • is_igraph(): Check whether a graph is of class igraph

Examples

data(florentine, package = "snafun")
is_network(florentine$flobusiness)   # FALSE
#> [1] FALSE
is_igraph(florentine$flobusiness)   # TRUE
#> [1] TRUE
data(emon, package = "network")
is_network(emon$Cheyenne)   # TRUE
#> [1] TRUE
is_igraph(emon$Cheyenne)   # FALSE
#> [1] FALSE