This creates an empty graph.

create_graph(directed = FALSE)

Arguments

directed

Choose if the graph is directed or not

Value

A nctx graph

Examples

library(RUnit) library(nctx) g <- create_graph(directed=TRUE) checkTrue(is_directed(g))
#> Error in is_directed(g): Not a graph object
#> [1] TRUE
#> [1] TRUE
g <- create_graph(TRUE) checkTrue(is_directed(g))
#> Error in is_directed(g): Not a graph object
#> [1] TRUE
#> [1] TRUE
g <- create_graph(directed=FALSE) checkTrue(!is_directed(g))
#> Error in is_directed(g): Not a graph object
#> [1] TRUE
#> [1] TRUE
g <- create_graph(FALSE) checkTrue(!is_directed(g))
#> Error in is_directed(g): Not a graph object
#> [1] TRUE
#> [1] TRUE