Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

umx_check

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

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

Structural Equation Modeling and Twin Modeling in R

v4.10.10
GPL-3
Authors
Timothy C. Bates [aut, cre] (<https://orcid.org/0000-0002-1153-9007>), Gillespie Nathan [wit], Michael Zakharin [wit], Brenton Wiernik [ctb], Joshua N. Pritikin [ctb], Michael C. Neale [ctb], Hermine Maes [ctb]
Initial release
2021-11-30

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.