data(gryphons)
pedigree <- fix_ped(gryphons[, 1:3])
## draw the gryphon pedigree
draw_pedA(pedigree, order = "original")
## draw the gryphon pedigree by function assigned generation
(Agen <- draw_pedA(pedigree, order = "generation"))
# \donttest{
## draw the gryphon pedigree by cohort in the dataset
## add cohort back from original data
pedigree$cohort <- NA
pedigree$cohort[match(gryphons$id, pedigree[, 1])] <- gryphons$cohort
(Achrt <- draw_pedA(pedigree, order = "user", grp = "cohort"))
## show two images of the same pedigree in different orders
### (i.e., plotting multiple trellis objects in the same figure)
plot(Agen,
position = c(xmin = 0, ymin = 0, xmax = 0.45, ymax = 1),
more = TRUE
)
plot(Achrt, position = c(xmin = 0.55, ymin = 0, xmax = 1, ymax = 1))
# }
Run the code above in your browser using DataLab