rep(x, times = 1, length.out = NA, each = 1) is pretty useful for simulating data. Here are some common recipes:
Repeat a single number (1) a number of times (10) rep(1, 10) ## [1] 1 1 1 1 1 1 1 1 1 1 Repeat a series of numbers (1:5) a number of times (2) rep(1:5, 2) ## [1] 1 2 3 4 5 1 2 3 4 5 rep(1:5, times=2) ## [1] 1 2 3 4 5 1 2 3 4 5 If times is not an integer, it is truncated (not rounded).