+ ## remove potential node labels; see ?read.nexus for justification
+ node.label <- gsub("[:;].*$", "", strsplit(x, ")")[[1]][-1])
+ has.node.labels <- FALSE
+ if (any(node.label != "")) {
+ x <- gsub(")[^:]*:", "):", x)
+ x <- gsub(")[^:]*;", ");", x) # if there's no root edge
+ has.node.labels <- TRUE
+ }