title: Treatment of mostly blank columns using readr::spec_csv
body: <p>I'm reading a lot of sparse data where 90%+ of many character columns are blank or a single space. Using readr::read_csv it will guess these columns as logical if the first 1000 rows have no data (by design as per <a href="https://github.com/tidyverse/readr/issues/662" rel="nofollow noreferrer">https://github.com/tidyverse/readr/issues/662</a>).</p>
  <p>Increasing guess_max isn't practical for 1M+ rows and if I don't specify the columns the guessing of col_logical generates parsing failures when rows with character data are found, so I've been using readr::spec_csv and manually editing the spec one column at a time using:</p>
  <pre><code>colSpec$cols[['colName']] &lt;- col_character()
  </code></pre>
  <p>Which is fine if there are not too many columns. For very wide data I'd like a more general form that can select all logical cols in the spec and change them, but I can't find the right syntax.
  This doesn't work:</p>
  <pre><code>library(readr)
  cs &lt;- readr::spec_csv(&quot;colChar, colBlank, colNum, colSpace, colNA\n
                        a,,1, ,NA\n
                        NA,,2, ,NA&quot;)
  
  cs
  #&gt; cols(
  #&gt;   colChar = col_character(),
  #&gt;   colBlank = col_logical(),
  #&gt;   colNum = col_double(),
  #&gt;   colSpace = col_logical(),
  #&gt;   colNA = col_logical()
  #&gt; )
  cs[cs$cols == col_logical()] &lt;- list(col_character())
  cs
  #&gt; cols(
  #&gt;   colChar = col_character(),
  #&gt;   colBlank = col_logical(),
  #&gt;   colNum = col_double(),
  #&gt;   colSpace = col_logical(),
  #&gt;   colNA = col_logical()
  #&gt; )
  </code></pre>