title: How to summarize data and create new column?
body: <p>I am having troubling summarizing my data the way I want it.  I was wondering if someone could point out where I was going wrong.
  Below is a subset of my data.  It came from the General Social Survey and the dimensions of my data set were 2x33500</p>
  
  <pre><code>              class  owngun
  32997  Middle Class      No
  8246  Working Class      No
  13613  Middle Class     Yes
  31553  Middle Class      No
  31316 Working Class      No
  20083  Middle Class     Yes
  26289  Middle Class      No
  29363  Middle Class      No
  25821 Working Class Refused
  4996   Middle Class     Yes
  14641  Middle Class     Yes
  15523  Middle Class     Yes
  27361 Working Class     Yes
  29035 Working Class     Yes
  25330  Middle Class      No
  16424   Lower Class     Yes
  17535 Working Class      No
  2841  Working Class      No
  18465  Middle Class      No
  16629  Middle Class     Yes 
  </code></pre>
  
  <p>When I generate a table for my dataset:</p>
  
  <pre><code>               owngun
  class            Yes   No Refused
    Lower Class    480 1254      21
    Working Class 6519 8752     142
    Middle Class  6216 8915     124
    Upper Class    391  678       7
    No Class         0    1       0
  </code></pre>
  
  <p>I like these values, but what I'm really interested in is the proportions of yes for each social class.  How do I generate a new column of the proportions of yes for each social class?  </p>
  
  <p>I have been trying to use dplyr to do this.  Can anyone suggest a way to proceed?</p>
  
  <p>Thank you</p>