In addChildren() and addParents(), labels of added individuals are generated
automatically if they are not specified by the user. The automatic labelling uses the
smallest integers not already in use.
addChild(), addSon() and addDaughter() are convenient wrappers for the most
common use of addChildren(), namely adding a single child to a pedigree. Note that
the parents can be given in any order. If only one parent is supplied, the other is
created as a new individual.
addSibling() adds a sibling to the indicated individual, creating parents if
necessary. The new sibling is placed either directly before or after the indicated
individual, depending on the side argument. (But note that the internal ordering of
individuals is not always respected when plotting the pedigree.)
removeIndividuals() removes the indicated individuals from the pedigree. If remove = "descendants" (default), their descendants are also removed, together with leftover
spouses disconnected from the remaining pedigree. Setting remove = "ancestors" does
the same, but removes upwards instead of downwards. Finally, if remove = "exact",
only the indicated individuals are removed.
The branch() function extracts the sub-pedigree formed by id and all his/her
descendants, and all necessary spouses. Note that some structure may be lost in this
process; for instance, compare x = halfSibTriangle(3) with branch(x, 1).
The trim() function iteratively removes uninformative leaves (i.e., members without
children) from the pedigree. Note that the definition of "uninformative" is entirely
user-defined. For example, trim(x, untypedMembers), will remove untyped individuals
from the bottom until the process stops.
Finally, subset() can be used to extract any sub-pedigree, returning a list of
pedigrees if the result is disconnected. By default, an error is raised if some
individuals would be left with exactly one parent. Alternatively, missingParents = "exclude" removes the parent-child connection in such cases, while missingParents = "include" adds the missing parent to the subset.