Get column names and frequency from a table that looks like a matrix
<p>I have a data frame that looks like:</p>

<pre><code>'Part Number' 'Person Working'
'A'           'James'
'B'           'Brian'
'A'           'Andrea'
'C'           'Tiffany'
</code></pre>

<p>and so on for thousands of rows. The same part can have multiple people assigned to it. I'm pretty bad at summarizing data in <strong>R</strong>, but I'm able to produce (in the console) a table that looks like a frequency matrix by typing:</p>

<pre><code>table(df$partnumber, df$personworking)
</code></pre>

<p>and it spits out unique items as rows, and every person working's name as a column. The values are a 0 or a 1 depending on if they are working that part.</p>

<p>What I'm looking for is a way to summarize this information in a digestible format that says, per item:</p>

<pre><code>Part Number   NumWorkers    Names
A             3             "James, Andrea"
B             1             "Brian"
C             1             "Tiffany"
</code></pre>

<p>I'm also struggling with getting my table into a data frame. I've tried:</p>

<pre><code>thedataframe &lt;- data.frame(thetable[,])
</code></pre>

<p>but I'm not getting very far. I want to sum the amount of people working each unique part, and concat and print each column name that has a one as a value for a given part.</p>

<p>What is the best way to summarize this data in Base <strong>R</strong>?</p>