dae (version 3.2.25)

rep.data.frame: Replicate the rows of a data.frame by repeating each row consecutively and/or repeating all rows as a group

Description

Replicate the rows of a data.frame by repeating each row consecutively and/or repeating all rows as a group.

Usage

# S3 method for data.frame
rep(x, times=1, each=1, ...)

Value

A data.frame with replicated rows.

Arguments

x

A data.frame whose rows are to be repeated.

times

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.

Author

Chris Brien

See Also

fac.gen in package dae and rep

Examples

Run this code
rep(fac.gen(list(a = 2, b = 2)), times=2, each=2)

Run the code above in your browser using DataLab