percentage of rows containing x in R
<p>Creating segmented proportion tables in R is pretty straightforward
    <code>data.frame(prop.table(table(df$x, df$y),2))</code></p>

<p>...but now I have a column structure like this</p>

<pre><code>         x                         y 
1        BMW, Mercedes, Toyota     M 
2        Toyota                    M 
3        GM, Ford                  M 
4        BMW                       M
5        Ford, Mercedes            F 
6        Toyota                    F
7        BMW, GM                   F
8        Toyota                    F
</code></pre>

<p>How do I create a proportion table (still segmented by y) that captures the percentage of rows <em>containing</em> each of the car manufacturers, knowing of course that the sum will be more than 1?</p>