getPedDirectRelatives: Get the direct relatives of selected animals from a pedigree
Description
Gets the full connected pedigree component reachable from the selected
animals in the supplied pedigree (ped). The result includes
ancestors, descendants, and collaterals such as siblings and mates. A
NULLped returns NULL.
A data.frame of pedigree records for the selected animals and
the full connected pedigree component (ancestors, descendants, siblings
and mates) in ped, or NULL when ped is NULL.
Arguments
ids
character vector of animal IDs
ped
pedigree dataframe object that is used as the source of
pedigree information.
unrelatedParents
logical vector when FALSE the unrelated
parents of offspring do not get a record as an ego; when TRUE they
get a place holder record as an ego in which the parent (sire,
dam) IDs are set to NA. Place holder records are made for
every collected ID that is absent from ped$id, including a
selected ID that is not in the pedigree.
See Also
Other direct relatives:
getFileDirectRelatives(),
getLkDirectAncestors(),
getLkDirectRelatives()
library(nprcgenekeepr)
## A pedigree to search and a focal animal whose direct relatives we wantped <- nprcgenekeepr::lacy1989Ped
getPedDirectRelatives(ids = "E", ped = ped)