Description Usage Arguments Value See Also Examples

Sorts two clusters vector by their names and returns a list with the sorted vectors.

1 2 | ```
sort_2_clusters_vectors(A1_clusters, A2_clusters,
assume_sorted_vectors = FALSE, warn = dendextend_options("warn"), ...)
``` |

`A1_clusters` |
a numeric vector of cluster grouping (numeric) of items, with a name attribute of item name for each element from group A1. These are often obtained by using some k cut on a dendrogram. |

`A2_clusters` |
a numeric vector of cluster grouping (numeric) of items, with a name attribute of item name for each element from group A2. These are often obtained by using some k cut on a dendrogram. |

`assume_sorted_vectors` |
logical (FALSE). Can we assume to two group vectors are sorter so that they have the same order of items? IF FALSE (default), then the vectors will be sorted based on their name attribute. |

`warn` |
logical (default from dendextend_options("warn") is FALSE). Set if warning are to be issued, it is safer to keep this at TRUE, but for keeping the noise down, the default is FALSE. |

`...` |
Ignored. |

A list with two elements, corresponding to the two clustering vectors.

FM_index_profdpm

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ```
## Not run:
set.seed(23235)
ss <- sample(1:150, 4 )
hc1 <- hclust(dist(iris[ss,-5]), "com")
hc2 <- hclust(dist(iris[ss,-5]), "single")
# dend1 <- as.dendrogram(hc1)
# dend2 <- as.dendrogram(hc2)
# cutree(dend1)
A1_clusters <- cutree(hc1, k=3)
A2_clusters <- sample(cutree(hc1, k=3))
sort_2_clusters_vectors(A1_clusters, A2_clusters, assume_sorted_vectors =TRUE) # no sorting
sort_2_clusters_vectors(A1_clusters, A2_clusters, assume_sorted_vectors =FALSE) # Sorted
## End(Not run)
``` |

dendextend documentation built on May 29, 2017, 3:29 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.