In python lists can be sliced like this x[4:-1] to get from the fourth to the last element.
x[4:-1]
In R something similar can be accomplished for vectors with
You could use the drop elements syntax:
> (1:10)[-(1:4)] [1] 5 6 7 8 9 10