c(2:5,
1:1,
3:5,
1:2,
4:5,
1:3,
5:5,
1:4)
> 2 3 4 5 1 3 4 5 1 2 4 5 1 2 3 5 1 2 3 4.
As one can see there is a pattern here. Starting at n=5 n-3:n, counting down and then followed by 1:n-4 and so on. My question is there any way to automate this using seq()
and rep()
in R?