Learn R Programming

phylogram (version 1.0.0)

ultrametricize: Make dendrogram ultrametric.

Description

This is a simple function that sets the 'height' attributes of all leaf nodes to zero to aid vizualization.

Usage

ultrametricize(x)

Arguments

x

an object of class "dendrogram".

Value

Returns an object of class "dendrogram".

Examples

Run this code
  x <- read.dendrogram(text = "(A:0.1,B:0.2,(C:0.3,D:0.4):0.5);")
  plot(x, horiz = TRUE)
  x <- ultrametricize(x)
  plot(x, horiz = TRUE)

Run the code above in your browser using DataLab