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

umx_array_shift

Like the php array_shift function: shifts an item off the beginning of a list


Description

Returns x[1]. Has the SIDE EFFECT of assigning x to x[2:end] in the container environment.

Usage

umx_array_shift(x)

Arguments

x

the vector to shift

Value

  • first item of x

See Also

Other Miscellaneous Utility Functions: install.OpenMx(), libs(), qm(), umxLav2RAM(), umxModelNames(), umxRAM2Lav(), umxVersion(), umx_find_object(), umx_lower.tri(), umx_msg(), umx_open_CRAN_page(), umx_pad(), umx_print(), umx

Examples

x = c("Alice", "Bob", "Carol")
umx_array_shift(x) # returns "Alice"
x # now only 2 items (altered in containing environment)

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.