rep.data.frame {dae} | R Documentation |

## 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 class 'data.frame'
rep(x, times=1, each=1, ...)
```

### Arguments

`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. |

### Value

A `data.frame`

with replicated rows.

### Author(s)

Chris Brien

### See Also

`fac.gen`

in package dae and `rep`

### Examples

```
rep(fac.gen(list(a = 2, b = 2)), times=2, each=2)
```

[Package

*dae*version 3.2.28 Index]