title: How do I change a named vector to a data frame retaining the names?
body: <p>I have following data structure after executing a function:</p>
  
  <pre><code>      A       B       C        D        E       
        92.08   90.68   54.09    92.87    97.40    
  
        F       G       H        I        J       ...       
        24.52   67.24   15.63    22.33    45.10   ...  
  </code></pre>
  
  <p>As a final result, I want to have the data in a simple data frame, with letters as rows and values in a column. Following worked, though I'm curious whether this is the most elegant way(?):</p>
  
  <pre><code>output &lt;- data.frame(output)
  output &lt;- data.frame(rownames(output), rowSums(output))
  colnames(output) &lt;- c("Category", "Value")
  output
  output %&gt;% arrange(desc(output))
  </code></pre>
  
  <p>If you have an idea to make it better, feel free to correct me.
  <code>dplyr</code> solutions appreciated.</p>
  
  <p>Thanks!</p>