title: Structure of variables not recognised when dataframe is a tibble
body: <p>I have made a function which assesses the structure of an input variable and then performs conditional descriptive statistics depending on what the variable is, means and sd for numeric and frequencies and proportions for factors.</p>
  <p>However, when the dataframe is a tibble the method I have used to identify the structure of the variable doesn't seem to work. Here is some toy data</p>
  <pre><code>set.seed(123)
  df &lt;- tibble(a = round(rnorm(5),1),
               b = factor(letters[1:5]))
  glimpse(df)
  
  # Output
  # Rows: 5
  # Columns: 2
  # $ a &lt;dbl&gt; -0.6, -0.2, 1.6, 0.1, 0.1
  # $ b &lt;fct&gt; a, b, c, d, e
  </code></pre>
  <p>Now if we ask R what type of variable each column is using the <code>is.x()</code> suite of functions it fails</p>
  <pre><code>is.numeric(df[,&quot;a&quot;])
  # [1] FALSE
  
  is.factor(df[,&quot;b&quot;])
  # [1] FALSE
  </code></pre>
  <p>But, if we turn the dataframe to a <code>data.frame</code> type object it identifies them correctly</p>
  <pre><code>df &lt;- as.data.frame(df)
  
  is.numeric(df[,&quot;a&quot;])
  # [1] TRUE
  
  is.factor(df[,&quot;b&quot;])
  # [1] TRUE
  </code></pre>
  <p>Now of course I could just convert the data.frame to a tibble in my function, but I was just curious how to get the result I got with the data.frame with the tibble, or some equivalent workaround?</p>