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

umx_rot

Rotate a vector


Description

umx_rot rotates the items of a vector (1 place, by default). So: c(1,2,3) -> c(2,3,1)

Usage

umx_rot(vec, na.last = FALSE)

Arguments

vec

vector to rotate

na.last

Whether to set the last value to NA (default = FALSE)

Value

References

See Also

Examples

umx_rot(1:10)
umx_rot(c(3,4,5,6,7))
# [1] 4 5 6 7 3

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.