How do I sort one vector based on values of another December 17, 2022 by Tarik what about this one x[order(match(x,y))]