I need to generate a vector of the following format using R:
1:10, 1:10, 11:20, 11:20, ... 121:130, 121:130
Is there an easier way than creating 12 vectors and then repeating each one twice?
Also you could do:
rep(1:10, 26) + rep(seq(0,120,10), each=20)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With