Shift the elements of a vector in circular mode by k elements to the right (for positive k) or to the left (for negative k), such that the first element is at the (k+1)th position of the new vector and the last k elements are appended to the beginning. VecShift does not attach the superfluous elements on one side to the other, but fills the resulting gaps with NAs.