alignped2 | R Documentation |
This is the second of the four co-routines.
alignped2(x, dad, mom, level, horder, packed, spouselist)
spouselist |
This routine takes a collection of siblings, grows the tree for each,
and appends them side by side into a single tree.
The input arguments are the same as those to alignped1
with the
exception that [[x]]
will be a vector. This routine does nothing
to the spouselist matrix, but needs to pass it down the tree and back
since one of the routines called by alignped2
might change the matrix.
The code below has one non-obvious special case. Suppose that two sibs marry.
When the first sib is processed by alignped1
then both partners
(and any children) will be added to the rval structure below.
When the second sib is processed they will come back as a 1 element tree
(the marriage will no longer be on the spouselist), which should be added
onto rval. The rule thus is to not add any 1 element tree whose value
(which must be x[i]
) is already in the rval structure for this level.
A set of matrices along with the spouselist matrix. The latter has marriages removed as they are processed.
plot.pedigree
, autohint
data(sample.ped)
ped <- with(sample.ped,pedigree(id, father, mother, sex, affected))
align.pedigree(ped)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.