title: finding vector value belonging to each interval
body: <p>I have two vectors with different length in R and I can combine these two vectors. I want to find vector values which belongs to each interval:</p>
  
  <pre><code>x = c(1, 2, 3.5, 4, 6, 7.5, 8, 9, 10, 11.5, 12) 
  y = c(2.5, 6.5) 
  
  w = sort(c(x, y))
  </code></pre>
  
  <p>I want to find the vector values x which less than 2.5 and the vector values x belong to interval (2.5, 6.5) and the vector value x bigger than 6.5?</p>
  
  <p>Actually the value of vector y change in each iteration of my algorithm, for eaxample maybe I have vector y with length=4 so how can I find the vector value belongs to each interval in each iteration?</p>