editPed | R Documentation |
Edits a disordered or incomplete pedigree by:
1) adding labels for the sires and dams not listed as labels before and
2) ordering pedigree based on recursive calls to getGenAncestors
.
editPed(sire, dam, label, verbose = FALSE)
sire |
integer vector or factor representation of the sires |
dam |
integer vector or factor representation of the dams |
label |
character vector of labels |
verbose |
logical to print the row of the pedigree that the function is ordering. Default is FALSE. |
a data frame with the pedigree ordered.
ped <- data.frame(sire=as.character(c(NA,NA,NA,NA,NA,1,3,5,6,4,8,1,10,8)),
dam=as.character(c(NA,NA,NA,NA,NA,2,2,NA,7,7,NA,9,9,13)),
label=as.character(1:14))
ped <- ped[sample(replace=FALSE, 1:14),]
ped <- editPed(sire = ped$sire, dam = ped$dam, label = ped$label)
ped <- with(ped, pedigree(label = label, sire = sire, dam = dam))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.