alc = function(x, id, gen) {
anc = ancestors(x, id, maxGen = gen, inclusive = TRUE)
length(anc)/sum(2^seq_len(gen))
}
avk = alc
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.