check_costMatrix: Check a costMatrix object for errors

View source: R/check_costMatrix.R

check_costMatrixR Documentation

Check a costMatrix object for errors

Description

Internal function to check a costMatrix object for errors.

Usage

check_costMatrix(costmatrix)

Arguments

costmatrix

A costMatrix object.

Details

Costmatrix 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.).

Value

An error message or empty vector if no errors found.

Author(s)

Graeme T. Lloyd graemetlloyd@gmail.com

Examples


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

# Check that this is a valid costMatrix object (should return empty vector):
check_costMatrix(costmatrix = costmatrix)


graemetlloyd/Claddis documentation built on May 9, 2024, 8:07 a.m.