Learn R Programming

berryFunctions (version 1.11.0)

seqR: seq with a range argument

Description

sequence given by range or vector of values.

Usage

seqR(range, from = 1, to = 1, extend = 0, ...)

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:1
to
end value of sequence. DEFAULT:1
extend
Factor f passed to extendrange. DEFAULT:0
...
further arguments passed to seq.

Value

Numeric vector.

See Also

seq, range, http://r.789695.n4.nabble.com/seq-range-argument-td4684627.html

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