function to select parents among individuals with phenotypes, assuming individual effects are IID

selCritIID(records, candidates, bsp, SP)

Arguments

records

The breeding program records object. See fillPipeline for details

candidates

Character vector of ids of the candidates to be parents

bsp

The breeding scheme parameter list

SP

The AlphaSimR SimParam object (not used, here for uniformity)

Value

An IID BLUP of the trait of the candidates

Details

Accesses all individuals in records to pick the highest among candidates. If candidates do not have records, a random sample is returned

Examples

allPop <- mergePops(records[[2]])
#> Error in mergePops(records[[2]]): object 'records' not found
candidates <- allPop@id
#> Error in eval(expr, envir, enclos): object 'allPop' not found
parents <- allPop[selCritIID(records, candidates, bsp, SP)]
#> Error in eval(expr, envir, enclos): object 'allPop' not found