title: How to create a vector that for each column in a data frame indicates whether or not it’s a factor
body: <p>I am working on Chapter 17 of R for Data Science: Iteration with purrr. </p>
  
  <p>One exercise has this newbie stuck: </p>
  
  <p>How can you create a single vector that for each column in a data frame indicates whether or not it’s a factor?</p>
  
  <p>Here's what I have come up with:</p>
  
  <pre><code>library(tidyverse)
  map(mtcars, is.factor(.$names(mtcars)))
  </code></pre>
  
  <p>Which obviously doesn't work. Your help is appreciated! </p>