validate_hypergraph {rhype}R Documentation

Quickly Validate a Hypergraph

Description

When using the rhype functions, the integrity of a hypergraph object should remain intact. However, as the properties of a hypergraph object are dependent on one another, it is possible in the case of an error or direct object manipulation by the user that a hypergraph object's integrity is corrupted. This will cause other rhype functions to either throw errors or to calculate incorrect answers. This function is not exhaustive but will perform multiple sanity checks on hypergraph objects and is a good place to start when debugging.

Usage

validate_hypergraph(hype, return = FALSE, verbose = TRUE)

Arguments

hype

A hypergraph object

return

A logical variable stating whether any output should be returned from the function

verbose

A logical variable indicating whether the function should output text to the screen

Value

Outputs text to screen of any problems found within the hypergraph object. If return is set to TRUE then a logical output will be returned. This logical output will be TRUE if it passed all of the tests, FALSE if it failed any test that proves the structure of the hypergraph is broken or NULL if it failed a test that most hypergraphs used practically should pass, but doesn't necessarily mean the hypergraph is broken, see text output for more details.

Examples

h <- example_hype()
validate_hypergraph(h)

[Package rhype version 0.3.0 Index]