Run »
repeat_indepent <- rep(c(1,2,3), times = c(5,2,1)) repeat_indepent
[1] 1 1 1 1 1 2 2 3