title: Select matrix rows that are permutations of a given vector
body: <p>I have a matrix <code>X</code>:</p>
  <pre><code>     one two three four
   [1,]  1   3   2   4
   [2,]  2   0   1   5
   [3,]  3   2   1   4
   [4,]  4   9   11  19
   [5,]  4   3   2   1
  </code></pre>
  <p>I want to get a new matrix <code>Y</code> which only contains rows that are permutations of &quot;1&quot;, &quot;2&quot;, &quot;3&quot;, &quot;4&quot;. That is:</p>
  <pre><code>     one two three four
   [1,]  1   3   2   4
   [3,]  3   2   1   4
   [5,]  4   3   2   1
  </code></pre>
  <p>What function or command should I use?</p>