sampleIndiv {optiSel} | R Documentation |
Sample Individuals from Pedigree
Description
Sampling Individuals from a Pedigree.
Usage
sampleIndiv(Pedig, from="Born", each=100)
Arguments
Pedig |
Pedigree with column |
from |
Column name. From each cohort specified in this column (e.g. year of birth), the number of individuals specified in parameter |
each |
Number of individuals to be sampled from each cohort. |
Details
From each cohort, a specified number of individuals will be sampled. If a cohort contains less individuals, then all individuals are sampled. This may be needed for estimating population specific parameters from a subset of a large pedigree to reduce computation time.
Value
Character vector containing the IDs of the individuals.
Author(s)
Robin Wellmann
Examples
data("PedigWithErrors")
set.seed(1)
Pedig <- prePed(PedigWithErrors)
use <- Pedig$Breed=="Hinterwaelder"
keep <- sampleIndiv(Pedig[use, ], from="Born", each=5)
keep
[Package optiSel version 2.0.9 Index]