GeomProg: Returns a numeric vector whose elements follow an geometric...

View source: R/GeomProg.R

GeomProgR Documentation

Returns a numeric vector whose elements follow an geometric progression

Description

The function generates a sequence of numbers which follow an geometric progression and which can be tuned by the function arguments

Usage

GeomProg(r=3, n=10)
GeomProg(st=5, r=3, n=10)

Arguments

st

The starting point of your geometric progression set to a default of one

n

Defines the length of the vector returned by the function (or defines how many terms are present in the proghression)

r

Defines the ratio with which the geometric series progresses

Details

The function always returns a vector. There are no other return types or no way to tune the return type in this function.

Value

The return type of the function is always a vector

Author(s)

Chitran Ghosal

Examples

v1 <- GeomProg(r=3, n=10)
v1

v2 <- GeomProg(st<-7, r=3, n=10)
v2



Chitran1987/StatsChitran documentation built on Feb. 23, 2025, 8:30 p.m.