nodeCount <- function(phy){
phy$edge.length <- rep(1, length(phy$edge.length))
nodes <- dist.nodes(phy)[Ntip(phy)+1,1:Ntip(phy)]
names(nodes) <- phy$tip.label
return(nodes)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.