I am having a list of data X with two vectors as follows:
X[1]=(1,2,3,5,6,9,7,8)
X[2]=(2,3,4,5,6)
Can I get a new list of data Y as follows?
Y[1]=(1,2,3,5,6,9,7,8,1,2,3,5,6,9,7,8)-repeat x[1]
Y[2]=(2,3,4,5,6,2,3,4,5,6)-repeat x[2]
For that, I have used the Y<-rep(X,2) but get
Y[1]:(1,2,3,5,6,9,7,8)
Y[2]:(2,3,4,5,6)
Y[3]:(1,2,3,5,6,9,7,8)
Y[4]:(2,3,4,5,6)
How to do it right?