geom.series {QSutils} | R Documentation

## Geometric series

### Description

Function to simulate haplotype abundances in the quasispecies by geometric series.

### Usage

    geom.series(n,p=0.001)

### Arguments

`n` | Number of frequencies to compute.
`p` | Numeric parameter of the geometric function.

### Details

The abundances, as counts, are computed according to the following equation:

p ~(1-p)^{i-1}, ~~ i=1..n

The lower `r`, the faster the decrease in abundances.

### Value

Numeric vector with `n` decreasing counts.

### Author(s)

Mercedes Guerrero-Murillo and Josep Gregori

### See Also

`GetRandomSeq`, `GenerateVars`, `Diverge`

### Examples

    # Simulate a quasispecies alignment.
    m1 <- GetRandomSeq(50)
    v1 <- GenerateVars(m1,50,2,c(10,1))
    qs <- c(m1,v1)
    w <- geom.series(100,0.8)

[Package QSutils version 1.12.0 Index]