You can use the rev() function to reverse an R vector.
Here is an example:
> a <- c(1,2,3,4,5,6,7)> rev(a)[1] 7 6 5 4 3 2 1