Call this with c = 0 for the original individual, and it will go back, n generations. Unlike in R, this is 0-based. So, n = 1 is parents, n = 2 is grandparents and so on.
i |
the index of the node to call this on |
c |
the current generation level. 0 = the first (i.e. the sampled individual) |
n |
the number of generations back to go. 1 means go no further than the parents. 2 means go no further than the grandparents. |
P |
the pedigree structure |
C |
a reference to a character vector to which sampled individuals' IDs will get pushed on. At the end, we can unique them. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.