seqRan: Create a sequence of defined length over range of a vector

View source: R/seqRan.R

seqRanR Documentation

Create a sequence of defined length over range of a vector

Description

Create a sequence of defined length over range of a vector

Usage

seqRan(x, length.out = NULL, rel.ext = c(0, 0), na.rm = TRUE, ...)

Arguments

x

Numeric vector

length.out

Length of sequence to create, Defaults to length of x.

rel.ext

Relative extention of sequence limits. Default rel.xt = c(0,0) maintains original range of x

na.rm

Logical. Should NAs be removed (see range)

...

Additional parameters to pass to seq

Value

Vector

Examples

x <- c(0,1,3,4)
seqRan(x) # default settings. Returns vector of length of x
seqRan(x, 10) # using original range of x
seqRan(x, 10, c(-0.1, 0.1)) # using extended range of x


marchtaylor/sinkr documentation built on July 4, 2022, 5:48 p.m.