# A nuclear family with 2 boys and 3 girls,
# where the father and the two boys are affected.
x = nuclearPed(boys=2, girls=3)
x2 = swapAff(x, ids=c(1,3,4))
# A pedigree showing a pair of third cousins
y = cousinPed(3)
plot(y)
# Adding a child on one side, to create third cousins once removed.
# The pedigree plot above helps identifying which individual
# should have the extra child
y2 = addOffspring(y, father=15, noffs=1)
# Half sibs:
z = halfCousinPed(0)
# Alternative construction:
z2 = nuclearPed(boys=1)
z2 = addOffspring(z2, father=1, noffs=1, sex=2)
Run the code above in your browser using DataLab