title: Drop row in a data frame if value has less than 2 decimal places
body: <p>In one column of a data frame, I have values for longitude. For example:</p>
  
  <p><code>df&lt;-data.frame(long=c(-169.42000,144.80000,7.41139,-63.07000,-62.21000,14.48333,56.99900))</code></p>
  
  <p>I want to keep rows which have at least three decimal places (i.e three non-zero values immediately after the decimal point) and delete all others. So rows 1,2,4 and 5 would be deleted from <code>df</code> in the example above.</p>
  
  <p>So far I've tried using<code>grep</code> to extract the rows I want to keep:</p>
  
  <p><code>new.df&lt;-df[-grep("000$",df$long),]</code></p>
  
  <p>However this has deleted all rows. Any ideas? I'm new to using grep so there may be glaring errors that I've not picked up on!</p>
  
  <p>Many thanks!</p>