This function takes a dendrogram class object as an input, and adds up all the distances of branches. This function is called recursively to adds up the sum. In case of exponential mapping for the quantitative mode, the sum is in the exponential scale
sum_distance(
d,
sum = 0,
mapping = c("exponential", "linear"),
scale = 0,
max_height = 0,
...
)
the sum of distances
dendrogram class object
the sum of distance
in case of quantitative mode, either "linear" or "exponential" mapping
ignored