R: Replicate Elements of 'ff' vectors.

ffrep.int {ffbase} | R Documentation

## Replicate Elements of `ff` vectors.

### Description

Similar as `rep.int` in the base package but for `ff` vectors.

### Usage

    ffrep.int(x, times)

### Arguments

`x` | an integer `ff` vector
`times` | integer `ff` vector giving the (non-negative) number of times to repeat each element if of length length(x), or an integer of length 1 indicating how many times to to repeat the whole vector. Negative or NA values are an error.

### Value

An ff vector of integers where x is recycled

### See Also

`rep.int`

### Examples

    ffrep.int(ff(1:1000), times=20)
    ffrep.int(ff(factor(LETTERS)), times=20)
    ffrep.int(ff(Sys.time()), times=20)
    ffrep.int(ff(seq.Date(Sys.Date(), Sys.Date()+10, by = "day")), times=20)

    x <- ff(factor(LETTERS), length=26)
    ffrep.int(x, times=ff(1:26))

    ## Or supply an ff vector of the same length as x
    x <- seq.Date(Sys.Date(), Sys.Date()+10, by = "day")
    x <- as.ff(x)
    ffrep.int(x, times=ff(0:10))

    x <- ff(factor(LETTERS), length=26)
    ffrep.int(x, times=ff(1:26))

[Package ffbase version 0.13.1 Index]