Learn R Programming

OpenMx (version 2.3.1)

omxCheckWarning: Correct Warning Message Function

Description

This function tests whether the correct warning message is thrown.

Usage

omxCheckWarning(expression, message)

Arguments

expression
an R expression that produces a warning
message
a character string with the desired warning message

Details

Arguments expression and message give the expression that generates the warning and the message that is supposed to be generated, respectively.

References

The OpenMx User's guide can be found at http://openmx.psyc.virginia.edu/documentation.

See Also

omxCheckError omxCheckWithinPercentError, omxCheckIdentical, omxCheckSetEquals, omxCheckTrue, omxCheckEquals

Examples

Run this code
msg <- paste("Objective functions like mxFIMLObjective()",
		"have been deprecated in favor of expectation and fit functions.\n",
		"Please use mxExpectationNormal(covariance= , means = , ...) instead,",
		"and add a call to mxFitFunctionML().",
		"See examples at help(mxExpectationNormal)")
foo <- omxCheckWarning(mxFIMLObjective('cov', 'mean'), msg)

Run the code above in your browser using DataLab