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:
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))
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?
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?
Try:
Here’s what happens when we change
y