umx_msg: Print the Name and Compact Contents of a Variable

umx_msgR Documentation

Print the Name and Compact Contents of a Variable

Description

A highly utilitarian function for rapid inline debugging. umx_msg safely captures the name of a variable (or expression) and prints its contents to the console via message() (stderr), before invisibly returning the original object.

Usage

umx_msg(x)

Arguments

x

An object, variable, or inline expression to be debug-printed.

Details

Because the return is invisible, you can wrap umx_msg around live assignments or pipeline stages without breaking the logic. It safely handles NULL values, multi-line expressions, and cleanly formats complex structures like data frames.

Value

  • Invisibly returns x (allowing inline pass-through).

References

https://tbates.github.io, https://github.com/tbates/umx

See Also

Other Miscellaneous Utility Functions: install.OpenMx(), libs(), qm(), umx, umxLav2RAM(), umxModelNames(), umxRAM2Lav(), umxVersion(), umx_ICA_report(), umx_array_shift(), umx_data(), umx_find_object(), umx_lower.tri(), umx_open_CRAN_page(), umx_pad(), umx_print(), umx_tail(), umx_wide2long(), umx_wide4lmer()

Examples

a = "brian"
umx_msg(a)

# Can be used inline without breaking assignment
a = umx_msg(mtcars[1,2]^2)

b = c("brian", "sally", "jane")
umx_msg(b)

# Safely handles missing data
umx_msg(NULL)

# Cleanly routes dataframe structures to stderr
umx_msg(mtcars[1:2, 1:3])

umx documentation built on Oct. 11, 2026, 5:07 p.m.