Learn R Programming

coala (version 0.3.0)

sumstat_seg_sites: Returns the Segregation Sites Statistics from simulations

Description

Returns the Segregation Sites Statistics from simulations

Usage

sumstat_seg_sites(name = "seg_sites", transformation = identity)

Arguments

name
The name of the summary statistic. When simulating a model, the value of the statistics are written to an entry of the returned list with this name. Summary statistic names must be unique in a model.
transformation
An optional function for transforming the results of the statistic. If specified, the results of the transformation are returned instead of the original values.

Examples

Run this code
set.seed(50)
model <- coal_model(5, 1) + feat_mutation(5) + sumstat_seg_sites("segsites")
stats <- simulate(model)
print(stats$segsites)

Run the code above in your browser using DataLab