Mutate: Mutate Chromosome

Description Usage Arguments Details Value Examples

Description

Make mutations in the chromosomes

Usage

1
Mutate(populationmutRate)

Arguments

population

Matrix of chromosomes currently in the population.

mutRate

A double given from the user that defines the mutation rate.

Details

This function creates binomially distributed mutations on chromosomes at the rate specified by the user.

Value

A matrix of chromosomes in the population. This overwrites the current population chromosomes.

Examples

1
2
3
set.seed(42)
test_PopChrom <- sample(c(0,1),1000,replace=T)
Mutate(test_PopChrom, 0.01)

GilChrist19/GA documentation built on May 13, 2019, 5:32 p.m.