match.nodelabels <- function(source, target){
nl <- character(source$Nnode)
pp <- prop.part(source, check.labels = FALSE)
labs <- attr(pp, "labels")
fl <- tempfile()
for (i in seq_len(source$Nnode)) {
cat(sort(labs[pp[[i]]]), sep = "\n", file = fl)
nl[i] <- tools::md5sum(fl)
}
unlink(fl)
source$node.label <- nl
#x1 <- makeNodeLabel(source, "md5sum")
x2 <- makeNodeLabel(target, "md5sum")
match(x2$node.label, source$node.label)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.