title: Is there a way to sort and combine values from multiple columns into a single column using R?
body: <p>Is there a way to sort and combine values from multiple columns into a single column using R?</p>
  
  <p>For example: if I have a Data Frame as below:</p>
  
  <pre><code>     [1]  [2] [3]
  [1]   2   bb  cat
  [2]   3   cc  bat
  [3]   5   xx  sat
  </code></pre>
  
  <p>I want to write code that creates a new column that sort the first 3 values and then combines them into a comma separated value</p>
  
  <p>Expected Output:</p>
  
  <pre><code>     [1]  [2] [3]  [4]
  [1]   2   bb  cat  2,bb,cat
  [2]   3   cc  bat  3,bat,cc
  [3]   5   xx  sat  5,sat,xx
  </code></pre>