Skip to content
Prev 181143 / 398502 Next

Behavior of seq with vector from

Rowe, Brian Lee Yung (Portfolio Analytics) wrote:
Don't know if this is "cleaner" or not.
It may be a little bit too tricky.

c(outer(2:3,seq(0,by=3,length.out=4),"+"))

  Can compress your example slightly:

c(t(apply(matrix(2:3), 1, seq, by=3,length.out=4)))