trimPed {pedigree} | R Documentation |
Function to trim a pedigree based on available data
Description
Trims a pedigree given a vector of data. Branches without data are trimmed off the pedigree.
Usage
trimPed(ped, data,ngenback = NULL)
Arguments
ped |
|
data |
TRUE-FALSE vector. Specifies if data for an individual is available. |
ngenback |
Number of generations back. Specifies the number of generations to keep before the individuals with data. |
Value
Logical vector specifying if an individual should stay in the pedigree.
Examples
id <- 1:5
dam <- c(0,0,1,1,4)
sire <- c(0,0,2,2,3)
data <- c(FALSE,FALSE,TRUE,FALSE,FALSE)
ped <- data.frame(id,dam,sire)
yn <- trimPed(ped,data)
ped <- ped[yn,]
[Package pedigree version 1.4.2 Index]