How to assign more than one value for \"each\" argument in \"rep\" function in R? A trivial example, where each value in a vector is 3-times repeated in a row:
well, depending on what you think the output should be, I'm guessing you want the times= parameter
times=
rep (a, times=c(2,4,7)) # [1] 2 2 4 4 4 4 6 6 6 6 6 6 6
See ?rep for the difference
?rep