Sunday, 15 March 2015

duplicate vector into matrix r -



duplicate vector into matrix r -

wondering how duplicate vector matrix in r. example

v = 1:10 dup = duplicate(v,2)

where dup looks rbind(1:10,1:10). thanks

i think you're looking replicate.

t(replicate(2, v))

r vector matrix

No comments:

Post a Comment