duplicate vector into matrix r
Alternatively:
matrix(v, nrow=2, ncol=length(v), byrow=TRUE)
I think you're looking for replicate
.
t(replicate(2, v))
Alternatively:
matrix(v, nrow=2, ncol=length(v), byrow=TRUE)
I think you're looking for replicate
.
t(replicate(2, v))