Learn R Programming

umx (version 4.0.0)

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(), qm(), umxBrownie(), umxLav2RAM(), umxRAM2Lav(), umxVersion(), umx_find_object(), umx_msg(), umx_open_CRAN_page(), umx_pad(), umx_print(), umx_score_scale(), umx

Examples

Run this code
# NOT RUN {
x = c("Alice", "Bob", "Carol")
umx_array_shift(x) # returns "Alice"
x # now only 2 items (altered in containing environment)
# }

Run the code above in your browser using DataLab