plot.pedigree {kinship} | R Documentation |
plot objects created with the function pedigree
plot.pedigree(x, id=x$id, sex=x$sex, status=x$status, affected=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), mar=c(4.1,1,4.1,1), angle=c(90, 70, 50, 0), keep.par=F, ...)
x |
object created by the function pedigree. |
id |
id variable - used for labelling. |
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 symbolsize. 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. |
mar |
no comment(s) |
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. |
returns points for each plot plus original pedigree.
creates plot on current plotting device.
## Not run: 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)) ## End(Not run)