Create Pedigree Structure

DESCRIPTION:

Create pedigree structure in format needed for plotting function.

USAGE:

pedigree(id, dadid, momid, sex, affected, status, relations)

REQUIRED ARGUMENTS:

id
identification variable for individual
dadid
identification variable for father
momid
identification variable for mother
sex
gender of individual noted in id. Either character ("male", "female", "unknown", "terminated") or numeric (1="male", 2="female", 3="unknown", 4="terminated") are allowed.

OPTIONAL ARGUMENTS:

affected
one variable, or a matrix, indicating affection status. Assumed that 1="unaffected", 2="affected", NA or 0="unknown".
status
status (0="censored", 1="dead")
relations
a matrix with 3 columns (id1, id2, code) specifying special relationship between pairs of individuals. Codes: 1=Monozygotic twin, 2=Dizygotic twin, 3=Twin of unknown zygosity, 4=Spouse and no children in pedigree.

VALUE:

an object of class pedigree.

SEE ALSO:

.

EXAMPLES:

# Make up some data:
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)