Assuming a vector (or matrix) of ids
> 1 2 3 3 2
Let's suppose each of these ids corresponds to a numerical value, stored in another vector
14 33 25
I'd like to replace the ids by their corresponding value to build the following vector
14 33 25 25 33
There must be a simple way to achieve this without resorting to loops, but my brain fails me at the moment, and I couldn't find anything in the documentation. Any ideas?