rep.data.frame | R Documentation |
Replicate the rows of a data.frame
by repeating each row consecutively and/or repeating all rows as a group.
## S3 method for class 'data.frame'
rep(x, times=1, each=1, ...)
x |
A |
times |
The number of times to repeat the whole set of rows, after the rows have been
replicated consecutively |
each |
The number of times to replicate consecutively each row in the |
... |
Further arguments passed to or from other methods. Unused at present. |
A data.frame
with replicated rows.
Chris Brien
fac.gen
in package dae and rep
rep(fac.gen(list(a = 2, b = 2)), times=2, each=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.