Simply finds the order of a vector in c++. Mostly for internals.
order_cpp(x)
x
numeric vector
same length vector of integers representing order of input vector
vec = c(1,4,3,2) order_cpp(vec)