Check for consistency
consistent.Rd
The disordR package is designed to make permitted operations transparent and to prevent forbidden operations from being executed.
Function consistent()
checks for matching hash codes of its
arguments and returns a Boolean. It is called by function
check_matching_hash()
which either returns TRUE
or
reports an informative error message if not.
Arguments
- x,y,e1,e2
Objects of class
disord
- use
optional object designed to give a more intelligible error message; typically
match.call()
Details
Function consistent()
checks that its arguments have the same
hash code, and thus their elements can be paired up (e.g. added).
Idiom a %~% b
is equivalent to consistent(a,b)
.
The package generally checks for consistency with function
check_matching_hash()
which provides some helpful diagnostics
if consistent()
finds a hash mismatch.