title: How to sort a character vector according to a specific order?
body: <p>I've got a character vector which looks like </p>
  
  <pre><code>c("white","white","blue","green","red","blue","red")
  </code></pre>
  
  <p>and a specific order which is like </p>
  
  <pre><code>c("red","white","blue","green")
  </code></pre>
  
  <p>. I would like to sort the first vector according to the order of the second vector in order to obtain the following vector : <code>c("red","red","white","white","blue","blue", "green")</code>. 
  What would be the best solution ? </p>