internal function such as sortByIndex as in package dplR, shifts
series to start with index 1, maintaining the same vector length by
adding NA values to the end.
Usage
sort_by_index(x)
Arguments
x
a numeric vector, representing an individual rwl series,
potentially containing NA values.