Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ffrep.int

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

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))

ffbase

Basic Statistical Functions for Package 'ff'

v0.13.3
GPL-3
Authors
Edwin de Jonge, Jan Wijffels, Jan van der Laan
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.