This function calls cutree(), or Hcl2mat(), or cmdscale(cophenetic()) in order to output the
Matrix Representation of Hierarchical clustering (MRH).
If method="groups" then clustering tree is cut by all possible numbers of clusters 'k'
(excluding 'k=1' and 'k=n' which bring no information) so 'dim' is always 'n-2'.
If method="height" then clustering tree is cut by equally spaced agglomeration heights
(excluding minimal and maximal heights which bring no information). Default 'dim' here is '2*n',
but higher values might work even better.
If method="branches" then use Hcl2mat() to transform object into the binary matrix of memberships,
always with 'n-1' dimensions (so user-specified 'dim' is not taken into account).
Each column in this matrix represents the tree branch.
If method="cophenetic" then multidimensional scaling scores with maximum dimensionality on cophenetic
distances are computed. Default 'dim' is 'n-1' but lesser numbers might work better.
The main feature of the resulted matrices is that they provide the "bridge" of conversion between original data,
distance matrices and clustering (including phylogenetic trees) results. After conversion, many interesting applications
become possible. For example, if converted trees represent the _same_ objects, it is possible to "hyper-bind",
or "average" (Ashkenazy et al., 2018) them.
To work with 'phylo' objects, convert them first to 'hclust' with as.hclust(), and before that, possibly also apply
compute.brlen(), multi2di() and collapse.singles().