title: How to make frequency table for all categorical variables in a dataframe?
body: <p>I tried to apply for loop to get count for each column in the dataframe. I created a freq names dataframe which only contains categorical variables.</p>
  
  <pre><code> n &lt;- names(freq)
  for(var in n){
    count(freq,var)
  }
  </code></pre>
  
  <p>I am getting the following <strong>error</strong>:</p>
  
  <blockquote>
    <p>Error in grouped_df_impl(data, unname(vars), drop) :    Column <code>var</code>
    is unknown</p>
  </blockquote>