pedigree.legend: Plot a pedigree legend

Description Usage Arguments Details Value See Also Examples

View source: R/pedigree.legend.R

Description

Plot a pedigree legend that describes the affected indiactors for a subject

Usage

1
2
3
pedigree.legend(ped, labels = dimnames(ped$affected)[[2]],
    edges = 200, radius=NULL, location="bottomright", new=TRUE,
    density = c(-1, 35, 55, 25),  angle = c(90, 65, 40, 0), ...) 

Arguments

ped

A pedigree object with id, dadid, momid, sex, affected

labels

names for the affected indicators

edges

Number of edges for each polygon. Higher numbers give better resolution for the circle.

radius

length of the circle's radius

location

Similar to how the location of a regular legend is given, used only if new=TRUE. A character string indicating which of the four corners to plot the legend, given by "bottomright", "bottomleft", "topleft", or "topright".

new

Logical. If TRUE, plot the legend on the current plot. Otherwise, plot on a separate plot.

density

Density of lines shaded in sections of the circle. These match the density settings for the plot.pedigree function.

angle

Angle at which lines are shaded in sections of the circle. These match the angles for the plot.pedigree function.

...

optional parameters for the plot function that apply to text.

Details

Adapt the pie() function to plot a circle with affected indicators. When new=TRUE, much care is needed to keep track of location and scaling of lines and text.

Value

Nothing is returned.

See Also

plot.pedigree

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(sample.ped)

fam1 <- sample.ped[sample.ped$ped==1,]

ped1 <- with(fam1, pedigree(id, father, mother, sex,
                 affected=cbind(avail,affected)))

plot(ped1)
pedigree.legend(ped1, location="bottomright", radius=.8)
pedigree.legend(ped1, location="topleft", radius=.6, cex=1.2)

pedigree.legend(ped1, new=FALSE)

kinship2 documentation built on May 29, 2017, 3:49 p.m.

Search within the kinship2 package
Search all R packages, documentation and source code