omxCheckWarning {OpenMx}R Documentation

Correct Warning Message Function

Description

This function tests whether the correct warning message is thrown. Arguments ‘expression’ and ‘message’ give the expression that generates the warning and the message that is supposed to be generated, respectively.

Usage

omxCheckWarning(expression, message)

Arguments

expression

an R expression that produces a warning

message

a character string with the desired warning message

Details

note: to test for no warning, set message = NA.

References

The OpenMx User's guide can be found at <https://openmx.ssri.psu.edu/documentation>.

See Also

omxCheckError omxCheckWithinPercentError, omxCheckIdentical, omxCheckSetEquals, omxCheckTrue, omxCheckEquals

Examples

foo <- omxCheckWarning(mxFIMLObjective('cov', 'mean'), "deprecated")

# Test for no warning
omxCheckWarning(2+2, message = NA)


[Package OpenMx version 2.21.11 Index]