seq1: Sequence Generation

Description Usage Arguments Value See Also Examples

View source: R/base.R

Description

seq1 is similar to seq, however by is strictly 1 by default and integer(0) is returned if the range is empty.

Usage

1
seq1(from, to, by = 1)

Arguments

from, to, by

see seq.

Value

seq1 returns either integer(0) if range is empty or what an appropriate call to seq returns otherwise.

See examples below.

See Also

seq

Examples

1
2
3
4
5
6
seq1(1, 3)
seq1(3, 1) # different from seq
seq(3, 1)
3:1

seq1(5, 1, -3)

docopulae documentation built on May 30, 2017, 7:43 a.m.