omxCheckSetEquals {OpenMx}R Documentation

Set Equality Testing Function


This function tests whether two vectors contain the same elements.


omxCheckSetEquals(a, b)


a The first vector to compare.
b The second vector to compare.


Performs the ‘setequal’ function on the two arguments. If the two arguments do not contain the same elements, then an error will be thrown. If ‘a’ and ‘b’ contain the same elements, by default the function will print a statement informing the user the test has passed. To turn off these print statements use options("mxPrintUnitTests" = FALSE).


The OpenMx User's guide can be found at

See Also

omxCheckCloseEnough, omxCheckWithinPercentError, omxCheckIdentical, omxCheckTrue


omxCheckSetEquals(c(1, 1, 2, 2, 3), c(3, 2, 1))

omxCheckSetEquals(matrix(1, 1, 1), matrix(1, 3, 3))

# Throws an error
try(omxCheckSetEquals(c(1, 2, 3, 4), c(2, 1, 3)))

[Package OpenMx version 0.2.9-1147 Index]