scale_model {coala}R Documentation

Function that downscales a coalescent model

Description

This function reduces the number of loci in all averaged loci by a certain factor. Non-averaged loci as created with locus_single are not modified in any way. This function is primarily designed for jaatha, and might be unsuitable for other purposes.

Usage

scale_model(model, scaling_factor)

Arguments

model

The model to downscale

scaling_factor

The factor by which the number of loci are reduced. A value of 2 changes to numbers to half their value (rounded), a value of 3 to a third an so on.

Examples

model <- coal_model(10, loci_number = 10) + locus_single(100)
model
# Group 1: 10 loci; group 2: 1 locus

model <- scale_model(model, 3)
model
# Group 1: 3 loci; group 2: 1 locus

[Package coala version 0.7.2 Index]