Im only beginner in R and would like a help. I have been given task to find consecutive numbers in my random sample selection of 1500 samples.
I have used the while loop to select my 1500 samples but cant find solution to how to find the amount of samples with 3 consecutive numbers.
I have tried rle but is not giving me results from the last random sample set of 6.