I need to use rep()and seq()to get the following vector:
1 2 3 4 5 2 3 4 5 6 3 4 5 6 7 4 5 6 7 8 5 6 7 8 9
I usually just use the operator forin order to achieve this, but I'm limited to this use and can be used rep(), and seq()to achieve this vector.
source
share