omxCheckWarning {OpenMx}R Documentation

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

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)

[Package OpenMx version 2.5.1 Index]