R/geom.series.R

Defines functions geom.series

Documented in geom.series

geom.series <-
function(n, p=0.001){
    ## Compute the geometric sequence
        ##  n: Number of frequencies to compute 
        ##  p: Parameter of the geometric function.
    if(!is(n, "numeric") & !is(p, "numeric"))
        stop("All arguments must be numeric \n")
    k <- seq_len(n)
    return((1-p)^(k-1)*p)
}
VHIRHepatiques/QSutils documentation built on April 27, 2024, 10:29 p.m.