Plot Pedigrees

DESCRIPTION:

Plot objects created with the function pedigree.

USAGE:

plot.pedigree(x, id=x$id, sex=x$sex, status=x$status,
              affected=as.matrix(x$affected), cex=1,
              col=rep(1, length(x$id)), symbolsize=1,
              branch=0.6, packed=T, align=packed, width=8,
              density=c(-1, 50, 70, 90), angle=c(90, 70, 50, 0),
              mar=c(4.1, 1, 4.1, 1), keep.par=F, ...)

REQUIRED ARGUMENTS:

x
an object created by the function pedigree.

OPTIONAL ARGUMENTS:

id
id variable - used for labeling.
sex
sex variable - used to determine which symbols are plotted.
status
can be missing. If it exists, 0=alive/missing and 1=death.
affected
variable, or matrix, of up to 4 columns representing 4 different affected statuses.
cex
controls text size. Default=1.
col
color for each id. Default assigns the same color to everyone.
symbolsize
controls symbol size. Default=1.
branch
defines how much angle is used to connect various levels of nuclear families.
packed
default=T. If T, uniform distance between all individuals at a given level.
align
default=T. Indicates extra effort should be spent trying to align parents and children. Set to F to speed up plotting.
width
default=8. For a packed pedigree, the minimum width allowed in the realignment of pedigrees.
density
defines density used in the symbols. Takes up to 4 different values.
angle
defines angle used in the symbols. Takes up to 4 different values.
keep.par
default = F, allows user to keep the parameter settings the same as they were for plotting (useful for adding extras to the plot).
...
extra options that feed into the plot function.

VALUE:

returns points for each plot plus original pedigree.

SIDE EFFECTS:

Creates a pedigree plot on the current plotting device.

SEE ALSO:

.

EXAMPLES:

d10 <- data.frame(upn=1:9, dadid=c(0,0,1,1,0,1,0,6,6),
                  momid=c(0,0,2,2,0,2,0,5,7),
                  sex=c(1,2,1,1,2,1,2,1,2),
                  affected=c(1,1,2,2,1,2,1,2,1))
ptemp <- pedigree(id=d10$upn, dadid=d10$dadid, momid=d10$momid, 
                  sex=d10$sex, affected=d10$affect)
plot(ptemp)
col.founder <- rep(1,length(d10$affect))
col.founder[d10$id==1] <- 2
plot(ptemp, affected=cbind(d10$affect, d10$affect2, d10$affect3,
     d10$affect4), col=col.founder, id=paste(ptemp$id,'\n',
     '(',d10$post,')',sep=''), angle=c(90,80,70,60), 
     density=c(-1,90,70,50))