'Julia - How to sort array and obtain the indexes
I have to arrays, one contain weights, and the other contain the categories (e.g w=[3, 4, 1, 2],x= ["a","b","c","c"]). Now, I'd like to sort the array x using the array of weights. How can one do this with the least amount of code? Is there a way of sorting an array and obtaining the corresponding indexes, so you can use this new sorted order in any other array with the same size?
I know that one can do this using DataFrames, but I'm looking for a way of doing this without resorting to that.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
