This is a non-critical refactoring suggestion: adding a function that asserts whether something is an igraph object, and errors if not.
To replace lines such as
if (!is_igraph(graph)) {
stop("Not a graph object")
}
and the ones that also first checks whether graph is NULL.
This is a non-critical refactoring suggestion: adding a function that asserts whether something is an igraph object, and errors if not.
To replace lines such as
and the ones that also first checks whether graph is NULL.