ffrep.int: Replicate Elements of 'ff' vectors.

Description Usage Arguments Value See Also Examples

View source: R/ffrep.R

Description

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

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
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 documentation built on Feb. 27, 2021, 5:06 p.m.