Does the same as cutree with two differences: Firstly it gives back an entire tree object, i.e. an object with attributes merge, height, labels and order, as well as data, which contains the cluster ids. Secondly the cluster ids are chosen by the heights at which the clusters were built.