title: Getting minimum value in dplyr
body: <p>I want to write a code in dplyr where i can take minimum value of two 
  consecutive rows</p>
  
  <pre><code>A &lt;- data.frame(
    y = c("A", "B", "C", "D", "E", "F"), 
    value = c(1, 2, 3, 4, 5, 6))
  A
  #   y value
  # 1 A     1
  # 2 B     2
  # 3 C     3
  # 4 D     4
  # 5 E     5
  # 6 F     6
  </code></pre>
  
  <p>Desired output</p>
  
  <pre><code>y value    
  A 1    
  C 3    
  E 5
  </code></pre>
  
  <p>I want to use dplyr package </p>
  
  <p>General code i use for grouping by name was </p>
  
  <pre><code>z &lt;- x %&gt;%    
    group_by(name)%&gt;%
    filter(value == min(value))
  </code></pre>
  
  <p>I cant think of "how to code "consecutive rows" in R or dplyr </p>