# NOT RUN {
# make NxN matrix with relationship categories:
RCM <- sapply(1:nrow(Ped), GetRelCat, Ped)
# table is considerably faster on a factor than a character vector:
table(factor(RCM, levels=c("M","P","FS","MHS","PHS","MGM")))
# note that sibling & cousin pairs are counted twice!
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab