cseq: cseq

Description Usage Arguments Value Examples

View source: R/wagnertimoR.R

Description

This function enhances the base seq() function by allowing patterns for the by parameter. The by parameter can handle an array with a incrementation sequence.

Usage

1
cseq(from, to, by)

Arguments

from

- a number from where to start the sequence

to

- a number where to end the sequence

by

- Set an array as a by sequence for a pattern of incrementations. Status Quo only positive incrementations are allowed - no negative numbers in the array.

Value

a vector with a number sequence of by patterns

Examples

1
2
3
4
# Get a sequence from 36 to 106 by incrementing with 3 again with 3 and then with 2 and repeat this till 106
cseq(36, 106, c(3,3,2))
[1]  36  39  42  44  47  50  52  55  58  60  63  66  68  71  74  76  79  82  84  87  90  92  95  98
[25] 100 103 106

wagnertimo/wagnertimoR documentation built on May 3, 2019, 7:37 p.m.