Efficient way to create a logical vector for interval presence in a vector