title: Table by groups using dplyr
body: <p>Here is my replicating example.</p>
  
  <pre><code>HAVE &lt;- data.frame(ID=c(1,2,3,4,5,6),
                     CLASS=c("A","A","B","B","C","C"),
                     AGE=c(14,13,11,12,14,14),
                     GENDER=c('MALE','MALE','FEMALE','MALE','FEMALE','FEMALE'))
  
  
  WANT &lt;- data.frame(COLUMN=c('AGE','GENDER = MALE'),
                     CLASSA=c(13.5,100),
                     CLASSB=c(11.5,50),
                     CLASSC=c(14,0))
  </code></pre>
  
  <p>Essentially the goal is to make a new data frame that shows the means for numeric variables and percentages for factor variables.</p>
  
  <pre><code>This is my coding attempt
  HAVE %&gt;%
    count(HAVE[,]) %&gt;%
    group_by(CLASS) %&gt;%
    mutate(mean)
  </code></pre>