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

repfromto

Virtual recycling


Description

repfromto virtually recylcles object x and cuts out positions from .. to

Usage

repfromto(x, from, to)

repfromto(x, from, to) <- value

Arguments

x

an object from which to recycle

from

first position to return

to

last position to return

value

value to assign

Details

repfromto is a generalization of rep, where rep(x, n) == repfromto(x, 1, n). You can see this as an R-side (vector) solution of the mod_iterate macro in arithmetic.c

Value

a vector of length from - to + 1

Author(s)

Jens Oehlschlägel

See Also

Examples

message("a simple example")
  repfromto(0:9, 11, 20)

bit

Classes and Methods for Fast Memory-Efficient Boolean Selections

v4.0.4
GPL-2 | GPL-3
Authors
Jens Oehlschlägel [aut, cre], Brian Ripley [ctb]
Initial release
2020-08-03

We don't support your browser anymore

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