Learn R Programming

kinship2 (version 1.3.1)

align.pedigree: Generate plotting information for a pedigree

Description

Given a pedigree, this function creates helper matrices that descibe the layout of a plot of the pedigree.

Usage

align.pedigree(ped, packed=TRUE, width=10, align=TRUE, hints=ped$hints)

Arguments

ped
a pedigree object
packed
should the pedigree be compressed, i.e., to allow diagonal lines connecting parents to children in order to have a smaller overall width for the plot.
hints
plotting hints for the pedigree. This is a list with components order and spouse, the second one is optional. If the hints are missing the autohint routine is called to supply an initial guess.

The order comp

width
for a packed output, the minimum width
align
for a packed pedigree, align children under parents (TRUE), to the extent possible given the page width, or align to to the left margin (FALSE). The latter is mostly used by internal routines.

Value

  • a structure with components
  • na vector giving the number of subjects on each horizonal level of the plot
  • nida matrix with one row for each level, giving the numeric id of each subject plotted. (An value of 17 means the 17th subject in the pedigree).
  • posa matrix giving the horizontal position of each plot point
  • fama matrix giving the family id of each plot point. A value of "3" would mean that the two subjects in positions 3 and 4, in the row above, are this subject's parents.
  • spousea matrix with values 1= subject plotted to the immediate right is a spouse, 2= subject plotted to the immediate right is an inbred spouse, 0 = not a spouse
  • twinsoptional matrix which will only be present if the pedigree contains twins. It has values 1= sibling to the right is a monozygotic twin, 2= sibling to the right is a dizygotic twin, 3= sibling to the right is a twin of unknown zygosity, 0 = not a twin

Details

This is an internal routine, used almost exclusively by plot.pedigree. The subservient functions alignped1, alignped2, alignped3, and alignped4 contain the bulk of the computation.

See Also

plot.pedigree, autohint