title: dplyr filtering with lubridate::hhmm format with minute()
body: <p>Answering this question <a href="https://stackoverflow.com/q/45800370/3250126">Temperature curve in R</a> I came across a weird behavior of a <code>dplyr::filter</code> - <code>lubridate::minute</code> combination. </p>
  
  <p>See the test data <code>dta</code> below. <code>dta$time</code> is a <code>lubridate::hhmm</code> format. </p>
  
  <pre><code>library(lubridate)
  library(dplyr)
  
  dta$Time &lt;- hm(dta$Time)
  </code></pre>
  
  <p>To get only rows with full hours (i.e. 0 minutes) one can subset using <code>lubridate::minute</code> like this: </p>
  
  <pre><code>dta[minute(dta$Time) == 0,]
  #        Time    Temp1    Temp2
  # 1        0S 18.62800 18.54458
  # 7  1H 0M 0S 18.45733 18.22625
  # 13 2H 0M 0S 18.33258 18.04142
  </code></pre>
  
  <p>However, when using <code>dplyr</code>'s <code>filter</code>, like this</p>
  
  <pre><code>dta %&gt;% filter(minute(Time) == 0)
  #     Time    Temp1    Temp2
  # 1     0S 18.62800 18.54458
  # 2 10M 0S 18.45733 18.22625
  # 3 20M 0S 18.33258 18.04142
  </code></pre>
  
  <p>the result does not really fit the expectation. (<strong>UPDATE</strong>: The values of <code>Temp1</code> and <code>Temp2</code> are correct, only <code>Time</code> is corrupt... Thanks to <a href="https://stackoverflow.com/users/3330437/brian">@Brian</a> btw for giving this hint. )</p>
  
  <p>Additionally this warning is returned: </p>
  
  <blockquote>
    <p><code>Warning message:
    In format.data.frame(x, digits = digits, na.encode = FALSE) :
      corrupt data frame: columns will be truncated or padded with NAs</code></p>
  </blockquote>
  
  <p>This was also reported and somehow solved <a href="https://stackoverflow.com/a/43853371/3250126">here</a>, but only by coercion, which seems to remove the fun (and very readable) part of lubridate. </p>
  
  <p><strong>Question</strong>: Is there any way (to date) to <code>dplyr::filter</code> <code>lubridate::hhmm(ss)</code> formats without coercing it to character etc.?</p>
  
  <h2>Update:</h2>
  
  <p>It seems that the vector created by </p>
  
  <pre><code>minute(dta$Time)
  # [1]  0 10 20 30 40 50  0 10 20 30 40 50  0
  </code></pre>
  
  <p>looks like a numeric vector, yet seems to have some mysterious characteristics. </p>
  
  <p>Furthermore, as @Lyngbakr pointed out even the comparison with <code>==</code> does not have the usual characteristics as a "normal" logical vector. </p>
  
  <pre><code>tst &lt;- minute(dta$Time) == 0 
  dta %&gt;% filter(tst)
  </code></pre>
  
  <p>will result in the same strange <code>Time</code> column. </p>
  
  <h3>Sample data:</h3>
  
  <pre><code>dta &lt;- read.table(text = "     Time        Temp1       Temp2
                             1  00:00     18.62800    18.54458
                             2   00:10     18.60025    18.48283
                             3   00:20     18.57250    18.36767
                             4   00:30     18.54667    18.36950
                             5   00:40     18.51483    18.36550
                             6   00:50     18.48325    18.34783
                             7   01:00     18.45733    18.22625
                             8   01:10     18.43767    18.19067
                             9   01:20     18.41583    18.22042
                             10  01:30     18.39608    18.21225
                             11  01:40     18.37625    18.18658
                             12  01:50     18.35633    18.05942
                             13  02:00     18.33258    18.04142", header = T)
  </code></pre>