trimPed {pedigree} | R Documentation |
Trims a pedigree given a vector of data. Branches without data are trimmed off the pedigree.
trimPed(ped, data)
ped |
data.frame with three columns: id,id parent1,id parent2 |
data |
TRUE-FALSE vector. Specifies if data for an individual is available. |
Logical vector specifying if an individual should stay in the pedigree.
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,]