Learn R Programming

Claddis (version 0.7.0)

check_stateGraph: Check a stateGraph object for errors

Description

Internal function to check a stateGraph object for errors.

Usage

check_stateGraph(stategraph)

Value

An error message or empty vector if no errors found.

Arguments

stategraph

A stateGraph object.

Author

Graeme T. Lloyd graemetlloyd@gmail.com

Details

Stategraph objects are more complex than what will typically be shown to the user. This function checks this hidden structure and reports any errors it finds.

These checks include rules 1-7 from Hoyal Cuthill and Lloyd (i prep.).

Examples

Run this code

# Make an unordered costmatrix:
costmatrix <- make_costmatrix(
  min_state = 0,
  max_state = 2,
  character_type = "unordered"
)

# Convert costmatrix to stategraph:
stategraph <- convert_costmatrix_to_stategraph(costmatrix = costmatrix)

# Check that this is a valid stateGraph object (should return empty vector):
check_stateGraph(stategraph = stategraph)

Run the code above in your browser using DataLab