title: giving if condition for time
body: <p>Is there any way we can give a condition statement in a if else loop as</p>
  
  <pre><code> a= "06/28/2017 08:45"
   b= "06/28/2017 08:32"
   c= difftime(a,b,units="mins)
  `if(a+30 &gt; b)
   { 
    print("you are late")
    }else
    print("on time")`
  </code></pre>
  
  <p>my data frame is </p>
  
  <pre><code>      col1                       col2
    6/27/2017 11:00 
    6/27/2017 20:45            
    6/24/2017 19:30               6/24/2017 18:48
    6/27/2017 20:00               6/28/2017 3:16
    6/29/2017 18:30               
    7/4/2017 7:30
    6/24/2017 1:30               6/24/2017 0:21
    6/29/2017 10:00
    6/28/2017 16:30              6/28/2017 18:39
    7/2/2017 19:00
  </code></pre>
  
  <p>I'm getting error as</p>
  
  <pre><code> `1.Error in if (a+30 &gt; b) missing value where TRUE/FALSE needed
    In Ops.factor(a+30 &gt; b) :‘&gt;’ not meaningful for factors
    2: In if (a+30 &gt; b) { : the condition has length &gt; 1 and only the first element will be used`
  </code></pre>
  
  <p>What I'm trying to do is to add 30min to 'a' and compare it wih 'b' to determine if something is late or on time. </p>