seq1 {docopulae}R Documentation

Sequence Generation

Description

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

Usage

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

seq1(1, 3)
seq1(3, 1) # different from seq
seq(3, 1)
3:1

seq1(5, 1, -3)

[Package docopulae version 0.4.0 Index]