title: R - Filter Data from a data frame
body: <p>I am a new guy in R and really unsure how to filter data in date frame.</p>
  
  <p>I have created a data frame with two columns including monthly date and corresponding temperature. It has a length of 324.</p>
  
  <pre><code>&gt; head(Nino3.4_1974_2000)
    Month_common               Nino3.4_degree_1974_2000_plain
  1   1974-01-15                       -1.93025
  2   1974-02-15                       -1.73535
  3   1974-03-15                       -1.20040
  4   1974-04-15                       -1.00390
  5   1974-05-15                       -0.62550
  6   1974-06-15                       -0.36915
  </code></pre>
  
  <p>The filter rule is to select the temperature which are greater or equal to 0.5 degree. Also, it has to be at least continuously 5 months.</p>
  
  <p>I have eliminate the data with less than 0.5 degree temperature (see below).</p>
  
  <pre><code>for (i in 1) {
  el_nino=Nino3.4_1974_2000[which(Nino3.4_1974_2000$Nino3.4_degree_1974_2000_plain &gt;= 0.5),]
  }
  
  &gt; head(el_nino)
     Month_common               Nino3.4_degree_1974_2000_plain
  32   1976-08-15                      0.5192000
  33   1976-09-15                      0.8740000
  34   1976-10-15                      0.8864501
  35   1976-11-15                      0.8229501
  36   1976-12-15                      0.7336500
  37   1977-01-15                      0.9276500
  </code></pre>
  
  <p>However, i still need to extract continuously 5 months. I wish someone could help me out.</p>