title: How do I filter a range of numbers in R?
body: <p>Let's say I have the data frame Mydata as shown below:</p>
  
  <pre><code>Mydata &lt;- data.frame(x = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10),
                       y = c(20, 30, 45, 54, 65, 78, 97, 102, 123, 156))
  </code></pre>
  
  <p>I want to filter this data frame and create another data frame, so that only the values of <code>x</code> between <code>3</code> and <code>7</code> and their corresponding <code>y</code> values are shown. I attempted the following:</p>
  
  <pre><code>new_frame &lt;- Mydata %&gt;% filter(x == (3:7))
  </code></pre>
  
  <p>This didn't work. How then would I filter for a specified range?</p>
  
  <p>Thanks in advance for all help</p>