I'm still fairly new to R but have been using it a lot lately to gather some statistics to back my intraday trading.
The one thing I'm missing so far in R (and what almost makes me want to go back to a "normal" programming language) is how to check if a certain level is hit before another.
Let's say I want to check the probability of hitting yesterdays high after a break of the IB high and before breaking the IB low.
I know how to filter & lag my dataset to have the required variables, but I have yet to find a good way in R for how to check which event occurs first within an intraday group of the data.