Description Usage Arguments Details Value Author(s) Examples
Calculates the optimum numbers of offspring from optimum contributions of selection candidates.
1 | noffspring(cand, N, random=TRUE)
|
cand |
Data frame with optimum contributions (column |
N |
Desired number of individuals in the offspring population. |
random |
Logical. If |
The function calculates the optimum numbers of offspring of the selection candidates from the optimum contributions cand$oc and the size N of the offspring population.
Data frame with column Indiv containing the individual IDs and column nOff containing the optimum numbers of offspring.
Column nOff is approximately 2*N*cand$oc with sum(noff[cand$Sex=="male"])=N and sum(noff[cand$Sex=="female"])=N.
Robin Wellmann
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | set.seed(1)
data(PedigWithErrors)
Pedig <- prePed(PedigWithErrors, thisBreed="Hinterwaelder")
use <- Pedig$Born %in% (1998:2008) & Pedig$Breed=="Hinterwaelder"
Population <- sampleIndiv(Pedig[use, ], each=50)
pKin <- pedIBD(Pedig, keep.only=Population)
Phen <- Pedig[Population, ]
Phen$isCandidate <- Phen$Born %in% (2003:2008)
cont <- agecont(Pedig, Population)
cand <- candes(phen=Phen, fA=pedIBD(Pedig, keep.only=Phen$Indiv), cont=cont)
con <- list(ub.fA=0.0175, uniform="female")
Offspring <- opticont("max.BV", cand, con, trace = FALSE)
N <- 250
Candidate <- Offspring$parent
Candidate$nOff <- noffspring(Candidate, N)$nOff
sum(Candidate$nOff[Candidate$Sex=="male"])
#[1] 250
sum(Candidate$nOff[Candidate$Sex=="female"])
#[1] 250
round(2*N*Candidate$oc-Candidate$nOff, 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.