Simple function to move the elements of a vector to earlier or
later positions depending on the value of shift
. Auxiliary to other functions,
rather multipurpose.
shift.vector(x, shift = 0, fill = FALSE)
x | vector. |
---|---|
shift | integer. Value |
fill | Values to fill newly created positions, e.g. |
The vector x, shifted left or right.
Nothing fancy here. This is used for example in Noumbissi()
to match denominator ranges to numerator positions using logical vectors.