powered by
The sorted vector is returned along with the original index of the vector it belonged to.
pairSort(x)
A real-valued vector to be sorted.
A list with two components:
sorted: The sorted version of x.
x
index: The index of the \(i^{th}\) element in x.
# NOT RUN { pairSort(c(5, 2, 6)) # }
Run the code above in your browser using DataLab