title: rbind.fill columns of different classes
body: <p>After battling the strangest behavior of dates in R, where I was unable to manipulate dates without getting tons of error messages. I finally realized that the two data frames which I merged using the plyr::rbind.fill function stored their date in different classes. One was Date, the other character. This was so hard to detect because the date strings were converted into some type of NA which does not trigger the usual is.na() test! My question by now is more fundamental about the nature of the date and what function could detect it. (One method is to convert to integers.)
  Here is a minimal example that illustrates the merging problem:</p>
  
  <pre><code>library(plyr)
  x1=cbind.data.frame(Date=Sys.Date()+(1:5), x = sample(letters,5))
  x2=cbind.data.frame(Date=Sys.Date()+(6:10), y = sample(letters,5))
  (y1 =plyr::rbind.fill(x1,x2))
  
  #           Date    x    y
  #  1  2015-05-02    k &lt;NA&gt;
  #  2  2015-05-03    o &lt;NA&gt;
  #  3  2015-05-04    n &lt;NA&gt;
  #  4  2015-05-05    v &lt;NA&gt;
  #  5  2015-05-06    m &lt;NA&gt;
  #  6  2015-05-07 &lt;NA&gt;    z
  #  7  2015-05-08 &lt;NA&gt;    s
  #  8  2015-05-09 &lt;NA&gt;    f
  #  9  2015-05-10 &lt;NA&gt;    q
  #  10 2015-05-11 &lt;NA&gt;    w
  
  x2$Date=as.character(x2$Date)
  (y2 =plyr::rbind.fill(x1,x2))
  
  #           Date    x    y
  #  1  2015-05-02    k &lt;NA&gt;
  #  2  2015-05-03    o &lt;NA&gt;
  #  3  2015-05-04    n &lt;NA&gt;
  #  4  2015-05-05    v &lt;NA&gt;
  #  5  2015-05-06    m &lt;NA&gt;
  #  6        &lt;NA&gt; &lt;NA&gt;    z
  #  7        &lt;NA&gt; &lt;NA&gt;    s
  #  8        &lt;NA&gt; &lt;NA&gt;    f
  #  9        &lt;NA&gt; &lt;NA&gt;    q
  #  10       &lt;NA&gt; &lt;NA&gt;    w
  
  sum(is.na(y2$Date))
  #  [1] 0
  
  is.null(y2$Date[6])
  # [1] FALSE
  
  is.na(y2$Date[6])
  # [1] FALSE
  
  class(y2$Date[6])
  # [1] "Date"
  </code></pre>