Say I have a vector which has thousands of elements. What is the R code necessary if I want to make the elements at indices between 100-200 become 0?
Additionally how would I count the length between two different values, for example if I want to know the length of time when the 'share price' is between 30-40?