Skip to content
Prev 350171 / 398506 Next

generate a list as follows: 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, . . . . ., n, n, n, n

Hi, John,

doesn't

n <- <your number>
lapply( 1:n, rep, each = 4)

do what you need?

  Hth  --  Gerrit
On Sat, 18 Apr 2015, John Sorkin wrote: