sampleIndiv: Sample Individuals from Pedigree

sampleIndivR Documentation

Sample Individuals from Pedigree

Description

Sampling Individuals from a Pedigree.

Usage

sampleIndiv(Pedig, from="Born", each=100)

Arguments

Pedig

Pedigree with column Indiv and the column specified in parameter from.

from

Column name. From each cohort specified in this column (e.g. year of birth), the number of individuals specified in parameter each is sampled. If a cohort contains less individuals, then all individuals are chosen.

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

optiSel documentation built on Sept. 11, 2024, 7:19 p.m.