Hi
I was quite sure I've seen a way to repeat vectors in mata the same way as in R with:
I searched for a while without luck, but then I figured it out:
For other lost soules I leave my findings.
The J function is quite powerfull.
Have a nice weekend
I was quite sure I've seen a way to repeat vectors in mata the same way as in R with:
Code:
> rep(c(0,1), 5) [1] 0 1 0 1 0 1 0 1 0 1
Code:
. mata J(1, 4, (0,1)) 1 2 3 4 5 6 7 8 +---------------------------------+ 1 | 0 1 0 1 0 1 0 1 | +---------------------------------+
The J function is quite powerfull.
Have a nice weekend
Comment