Sort data.frame in specific order (NOT ascending/descending)
<pre><code>a = data.frame(x = c("fl", "kl", "po", "rt", "st"), a = runif(5), b = runif(5), c = runif(5), stringsAsFactors=FALSE)

reference = c("po", "rt", "fl", "st", "kl")
</code></pre>

<p>There is data.frame <code>a</code> and it should be sorted on <code>x</code> according to the <code>reference</code> vector. How would I do this? </p>