[r] Getting the last n elements of a vector. Is there a better way than using the length() function?