Check if an object is a sfnetwork
is.sfnetwork(x)
TRUE
if the given object is an object of class
sfnetwork
, FALSE
otherwise.
library(tidygraph, quietly = TRUE, warn.conflicts = FALSE)
net = as_sfnetwork(roxel)
is.sfnetwork(net)
#> [1] TRUE
is.sfnetwork(as_tbl_graph(net))
#> [1] FALSE