Skip to content

Generate regular sequence from a range. Wrapper function for seq().

Usage

seq_range(range, by = NA, length.out = NULL)

Arguments

range

Vector with starting and end values of the sequence. Only first two elements are considered.

by

Number; increment of the sequence.

length.out

Desired length of the sequence. A non-negative number, which will be rounded up if fractional.

Value

Returns a vector of type "integer" or "double": programmers should not rely on which.

See also

Author

Michaja Pehl

Examples

seq_range(range(1:13), by = 3)
#> [1]  1  4  7 10 13