vecseq: Vectorized Sequence Generation

Description Usage Arguments Value Author(s) Examples

Description

Generate regular sequences. seq is a standard generic with a default method. This is a vectorized version of the seq function from base R.

Usage

1
seq(from = 1, to = 1, by = ((to - from)/(length.out - 1)), length.out = NULL, along.with = NULL, ...)

Arguments

from

the starting value of the sequence. Of length 1 unless just from is supplied as an unnamed argument.

to

the ending (maximal) value of the sequence. Of length 1 unless just from is supplied as an unnamed argument.

by

number: increment of the sequence.

length.out

desired length of the sequence. A non-negative number, which for seq and seq.int will be rounded up if fractional.

along.with

take the length from the length of this argument.

...

arguments passed to or from methods.

Value

A matrix of vectors, with each column corresponding to a sequence specified by from and to.

Author(s)

Magically generated by the Vectorize function.

Examples

1
2
3
4
5
6
7
8
9
vecseq(from = c(1, 1.75), to = c(2, 2.75), by = 0.25)

# results in:
#      [,1] [,2]
# [1,] 1.00 1.75
# [2,] 1.25 2.00
# [3,] 1.50 2.25
# [4,] 1.75 2.50
# [5,] 2.00 2.75

rpkyle/cscmisc documentation built on May 13, 2019, 12:06 p.m.