When you call this from within search_up(), c should be set at 0, and the algorithm will run down for, n generations from there. Unlike in R, this is 0-based. So, n = 0 is self, n = 1 is kids, n = 2 is grandkids, and so forth.
i | 
 the index of the node to call this on  | 
c | 
 the current generation level. 0 = the first (i.e. the starting individual).  | 
n | 
 the number of generations back to down. 1 means go no further than the offspring. 2 means go no further than the grandkids.  | 
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.