Learn R Programming

optiSel (version 2.0)

pedInbreeding: Calculates Pedigree Based Inbreeding

Description

Calculates Pedigree Based Inbreeding

Usage

pedInbreeding(Pedig)

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.

Value

A data frame 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.

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