This help topic is for R version 0.60. For the current version of R, try https://stat.ethz.ch/R-manual/R-patched/library/base/html/sequence.html
sequence {base}R Documentation

Create A Vector of Sequences

Description

For each element of nvec the sequence seq(nvec[i]) is created. These are appended and the result returned.

Usage

sequence(nvec)

Arguments

nvec

an integer vector each element of which specifies the upper bound of a sequence.

See Also

gl, seq, rep.

Examples

sequence(c(3,2))# the concatenated sequences 1:3 and 1:2.
#> [1] 1 2 3 1 2

[Package base version 0.60 ]