Learn R Programming

berryFunctions (version 1.22.5)

seqR: seq with a range argument

Description

sequence given by range or vector of values.

Usage

seqR(range, from = NA, to = NA, extend = 0, warn = TRUE, ...)

Value

Numeric vector.

Arguments

range

vector with 2 values (1st taken as from, 2nd as to) or more (the result is then always ascending).

from

start value of sequence. DEFAULT: NA (determined from range)

to

end value of sequence. DEFAULT: NA (determined from range)

extend

Factor f passed to extendrange. DEFAULT: 0

warn

Logical: warn about non-numeric classes? DEFAULT: TRUE

...

further arguments passed to seq.

Author

Berry Boessenkool, berry-b@gmx.de, Feb 2014

See Also

Examples

Run this code

seqR(range=c(12,6), by=-2)
m <- c(41, 12, 38, 29, 50, 39, 22)
seqR(m, len=6)
# Takes min and max of range if the vector has more than two elements.

seqR(range=c(12,6), by=-2, extend=0.1)
# internaly calls extendrange with f=extend

Run the code above in your browser using DataLab