Learn R Programming

popgenr (version 0.2)

coal: Simulate and visualize a coalescent process

Description

A function that provides a simple starting off point to simulate a coalescent process.

Usage

coal(length, number, muscale, reps, prnt)

Arguments

length

Length of sequence to simulate.

number

Number of starting lineages.

muscale

Mutation rate, scaled by 4Neu.

reps

Number of replicates to run.

prnt

Whether to print calculation output to the terminal (prnt=1), or not (prnt=0).

Examples

Run this code
# NOT RUN {
#assign genotype counts
length=250

number=8

muscale=6.25 # theta = 4Neu = 25, theta/4 = 6.25

reps=100

prnt=0

#run function
coal(length, number, muscale, reps, prnt)
# }

Run the code above in your browser using DataLab