Description Usage Arguments Value
Order columns in a dataframe by a value using hierchical clustering. Used primarily when making a heatmap style plot so the function takes two columns, one intended to the be rows of the heatmap and the other intended to be the column.
1 2 | cluster_order(x, row, column, value, dist_method = "euclidean",
hclust_method = "complete")
|
x |
dataframe |
row |
bare name of column to be the rows |
column |
bare name of column to be the columns |
value |
bare name of column to order by |
dist_method |
distance method, passed to stats::dist |
hclust_method |
hierchical clustering method, passed to stats::hclust |
dataframe with columns ordered
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.