simplegraph (version 1.0.0)

sanitize: Check the validity of a graph data structure

Description

This is mainly for internal checks, but occasionally it might also useful externally.

Usage

sanitize(x, ...)

Arguments

x

Graph.

...

Extra arguments are curently ignored.

Examples

Run this code
G <- graph(list(A = c("B", "C"), B = "C", C = "A"))
sanitize(G)

G <- c(G, list("this is not good" = c(1, 2, 3)))
try(sanitize(G))

Run the code above in your browser using DataCamp Workspace