powered by
Replicate the rows of a data.frame by repeating each row consecutively and/or repeating all rows as a group.
data.frame
# S3 method for data.frame rep(x, times=1, each=1, ...)
A data.frame with replicated rows.
A data.frame whose rows are to be repeated.
The number of times to repeat the whole set of rows, after the rows have been replicated consecutively each times.
each
The number of times to replicate consecutively each row in the data.frame.
Further arguments passed to or from other methods. Unused at present.
Chris Brien
fac.gen in package dae and rep
fac.gen
rep
rep(fac.gen(list(a = 2, b = 2)), times=2, each=2)
Run the code above in your browser using DataLab