Description Usage Arguments Details Value Examples
Build all pedigrees between a set of individuals, subject to given restrictions.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
labs |
A character vector of ID labels. |
sex |
A vector of the same length as |
extra |
Either the word "parents", or a nonnegative integer. See details. |
age |
A numeric or character vector. If numeric, and Alternatively |
knownPO |
A list of vectors of length 2, containing the ID labels of
pairs known to be parent-offspring. By default, both directions are
considered; use |
allKnown |
A logical. If TRUE, no other pairs than |
notPO |
A list of vectors of length 2, containing the ID labels of pairs known not to be parent-offspring. |
noChildren |
A vector of ID labels, indicating individuals without children of their own. |
connected |
A logical. If TRUE (default), only connected pedigrees are returned. |
linearInb |
Either TRUE (allow any linear inbreeding), FALSE (disallow
linear inbreeding) or a nonnegative integer indicating the maximum
separation linearly related spouses. For example, |
maxLinearInb |
Deprecated; replaced by |
sexSymmetry |
A logical. If TRUE (default), pedigrees which are equal except for the gender distribution of the added parents, are regarded as equivalent, and only one of each equivalence class is returned. Example: paternal vs. maternal half sibs. |
verbose |
A logical. |
The parameter extra
controls which of two algorithms are used to create the
pedigree list.
If extra
is a nonnegative integer, it determines the number of extra
individuals allowed in the iterative pedigree construction. These extras
start off with undetermined sex, meaning that both males and females are
used. It should be noted that the final pedigrees may contain additional
extras, since missing parents are added at the end.
If extra
is the word "parents", the algorithm is not iterative. It first
generates all directed acyclic graphs between the original individuals. Then
their parents are added and merged in all possible ways. This option has the
advantage of not requiring an explicit/ad hoc number of "extras", but works
best in smaller cases.
A list of pedigrees. Each element is a ped
object or a list of
such.
1 2 3 4 5 6 7 8 9 10 | # Showing off a few of the options
plist = buildPeds(1:3, sex = c(1,2,1), extra = 1, knownPO = list(1:2),
age = "1 > 2", linearInb = FALSE)
stopifnot(length(plist) == 12)
# Slightly different output with `extra = "parents"`
plist2 = buildPeds(1:3, sex = c(1,2,1), extra = "parents", knownPO = list(1:2),
age = "1 > 2", linearInb = FALSE)
stopifnot(length(plist2) == 8)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.