Skip to content

Commit

Permalink
Error correction for duplicate node labels
Browse files Browse the repository at this point in the history
jeremymiller authored Jun 16, 2021
1 parent 86b77dd commit 183310c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/required_scripts.R
Original file line number Diff line number Diff line change
@@ -340,7 +340,7 @@ plot_dend <- function (dend, dendro_data = NULL, node_size = 1, r = c(-0.1, 1))

overwrite_dend_node_labels <- function (dend, n = 1, lab = labels(dend))
{
if (!is.element(attr(dend, "label"),lab)) {
if ((!is.element(attr(dend, "label"),lab))|(length(dend) == 1)) {
attr(dend, "label") = paste0("n", n)
n = n + 1
}

0 comments on commit 183310c

Please sign in to comment.