gseq: Geometric Sequence Creator

Description Usage Arguments Examples

Description

This simple function creates a geometric sequence

Usage

1
2
 
gseq(from, to, by, addrem = FALSE, addzero = FALSE)

Arguments

from

the initial value

to

the final value

by

the multiplication factor

addrem

if the final value is surpassed by multiplication, add.rem = TRUE will add it as the last element of the vector

addzero

add a zero at the beginning

Examples

1
2
3
4
5
6
7
8
### For thse sequence 0 .4, 4, 40, ..., 4e10
gseq(.4,4e10,10, addzero = TRUE)

### A truncated sequence without add.rem
gseq(1,100,2)

### A truncated sequence with add.rem
gseq(1,100,2,addrem = TRUE)

Rsundials documentation built on Jan. 15, 2017, 11:33 p.m.

Related to gseq in Rsundials...