Set the most right leaf object from a dendrogram

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

1 2 | ```
sum_distance(d, sum = 0, mapping = c("exponential", "linear"), scale = 0,
max_height = 0, ...)
``` |

`d` |
dendrogram class object |

`sum` |
the sum of distance |

`mapping` |
in case of quantitative mode, either "linear" or "exponential" mapping |

`...` |
ignored |

the sum of distances

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.