title: Create proportional tables of a single variable with a list of variables
body: <p>This is probably a very easy question, but I cannot seem to figure it out. </p>
  
  <p>I created a proportional table of two variables:</p>
  
  <pre><code>mtcars %&gt;%
    group_by(cyl, carb)%&gt;%
    summarise(n=n())%&gt;%
    mutate(prop=n/sum(n))%&gt;%
    subset(select=c("cyl", "carb", "prop"))%&gt;%
    spread(cyl, prop)%&gt;%
    kable()
  </code></pre>
  
  <p>Now I want to create multiple tables with cyl as one variable and looping through a list of multiple variables for the second variable. This was one approach I tried that didn't work:</p>
  
  <pre><code>cols = c('vs', 'am', 'gear', 'carb')
  for (q in cols) {
    map2(~prop.table(table(mtcars[[q]], mtcars[["cyl"]])))
  }
  </code></pre>
  
  <p>Thanks in advance for any help!</p>