views:

298

answers:

1

Is there any way to generate a dendrogram where each level of the graph represents a generation and only sons of the same father are connected at each level?

I'm attempting to use R's hclust and plot functions to generate a dendrogram of father-son lineage. The desired result is a dendrogram where each generation of sons is placed on the same line, under their father.

I was hoping that hclust and the "complete" method would allow me to use the dissimilarity matrix to assign sons of the same father a 0 dissimilarity score and then be placed on the same hierarchical level, exclusive from any other entities in the dataset. This doesn't work, there are sons of different generations on the same level.

Any help is greatly appreciated!

Here is some example data:

father,son
A,C
A,D
A,E
B,F
B,G
C,H
C,I
F,J
F,K
G,L

Agent A has three sons: C, D, and E; and two grandsons through C: H and I.

Agent B has two sons: F and G; and a total of three grandsons: J, K, and L.

+3  A: 

Do you need something like this?

"Drawing pedigree diagrams with R and graphviz"

http://www.mrc-epid.cam.ac.uk/~jinghua.zhao/software/peddraw.pdf

yuk
The plot.pedigree looks very close. I'll have to look more into what options are available and how to transform my data into a pedigree object. Thanks for the lead!
mattrepl