Learn R Programming

optiSel (version 2.0.7)

pedInbreeding: Calculates Pedigree Based Inbreeding

Description

Calculates Pedigree Based Inbreeding

Usage

pedInbreeding(Pedig)

Value

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

Arguments

Pedig

Data frame containing the Pedigree with the first 3 columns being Indiv (individual ID), Sire, and Dam, which is usually obtained with function prePed. Missing parents are coded as NA.

Author

Robin Wellmann

Details

Computation of pedigree based inbreeding. This function is a wrapper function for pedigree from package pedigree.

Examples

Run this code
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