How can I add multiple spouses to my pedigree using the Kinship2 package?

198 Views Asked by At

I am trying to plot quite complex pedigrees using the Kinship2 R package. Most of the families show high levels of consanguinity and multiple spouses, how can I show that on my pedigree.

This is my current plot

##data
df <- data.frame(id=c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29),
             sex=c(1,2,1,2,2,2,1,2,2,1,1,1,2,2,2,2,2,2,2,2,2,1,2,2,1,2,1,1,1),
             dadid=c(0,0,1,1,1,1,1,0,0,0,0,0,0,3,3,10,10,10,11,11,11,11,12,12,7,7,7,0,28),
             momid=c(0,0,2,2,2,2,2,0,0,0,0,0,0,8,8,4,4,4,5,5,5,5,6,6,13,13,13,0,16),
             status=c(0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))


ped <- pedigree(id = df$id, dadid = df$dadid, momid = df$momid, sex = df$sex, status=df$status)
plot(ped)

I would like to add consanguineous double likes between 28 and 16, a second spouse to 3, as well as add a spouse for 14.

How can I do that?

Current plot

0

There are 0 best solutions below