umx_check: umx_check

umx_checkR Documentation

umx_check

Description

Check that a test evaluates to TRUE. If not, stop, warn, or message the user

Usage

umx_check(
  boolean.test,
  action = c("stop", "warning", "message"),
  message = "check failed",
  ...
)

Arguments

boolean.test

test evaluating to TRUE or FALSE.

action

One of "stop" (the default), "warning", or "message".

message

what to tell the user when boolean.test is FALSE.

...

extra text will be pasted after the messages.

Value

- boolean

See Also

Other Test: umx_check_OS(), umx_check_model(), umx_check_names(), umx_check_parallel(), umx_has_CIs(), umx_has_been_run(), umx_has_means(), umx_has_square_brackets(), umx_is_MxData(), umx_is_MxMatrix(), umx_is_MxModel(), umx_is_RAM(), umx_is_cov()

Examples

umx_check(length(1:3)==3, "message", "item must have length == 3", "another comment", "and another")
umx_check(1==2, "message", "one must be 2", ". Another comment", "and another")

umx documentation built on May 29, 2024, 5:40 a.m.