Learn R Programming

optiSel (version 0.9.1)

pedInbreeding: Calculates Pedigree Based Inbreeding

Description

Calculates Pedigree Based Inbreeding

Usage

pedInbreeding(Pedig)

Arguments

Pedig

Data frame containing the Pedigree. The data frame has columns (1) Individual, (2) Sire, (3) Dam. Missing parents are coded as NA. Consider preparing the pedigree with function prePed before.

Value

A data frame or data table with column Indiv containing the individual IDs and column Inbr containing the inbreeding coefficients.

Details

Computation of pedigree based inbreeding. This function is a wrapper function for pedigree from package pedigree and is compatible with the data.table package.

Examples

Run this code
# NOT RUN {
data(PedigWithErrors)
data(Phen)
keep  <- Phen$Indiv 
Pedig <- prePed(PedigWithErrors, keep=keep)
Res   <- pedInbreeding(Pedig)
mean(Res$Inbr[Res$Indiv %in% keep])
#[1] 0.01943394
# }

Run the code above in your browser using DataLab