Learn R Programming

xegaPopulation (version 1.0.0.12)

xegaBestGeneInPopulation: Extracts indices of best genes in population.

Description

xegaBestGeneInPopulation() extracts the indices of the best genes in the population.

Usage

xegaBestGeneInPopulation(fit)

Value

List of the indices of the best genes in the population.

Arguments

fit

Fitness vector of a population of genes.

Details

You might use: which(max(fit)==fit). But this is slower!

See Also

Other Population Layer: xegaBestInPopulation(), xegaEvalPopulation(), xegaInitPopulation(), xegaLogEvalsPopulation(), xegaNextPopulation(), xegaObservePopulation(), xegaRepEvalPopulation(), xegaSummaryPopulation()

Examples

Run this code
pop10<-xegaInitPopulation(10, lFxegaGaGene)
epop10<-xegaEvalPopulation(pop10, lFxegaGaGene)
xegaBestGeneInPopulation(epop10$fit)

Run the code above in your browser using DataLab