How to repeat whole vector in R

r

#1

I was studying about repeation of vector in R while performing I faced the challenge that how to repeat whole vector
for example a vector of c(0,1,2) I want repeation of whole vector instead I am getting repeation of single value of vector
rep(c(0,1,2),10)
[1] 0 1 2 0 1 2 0 1 2 0 1 2 0 1 2 0 1 2 0 1 2 0 1 2 0 1 2 0 1 2


#2

Its hows the exact way you could do the repeat operation.