Rename an umapscan cluster
rename_cluster(us, old, new)
us | umapscan object |
---|---|
old | current cluster identifier |
new | new cluster label |
An updated umapscan object (invisibly). If two clusters have the same name after renaming, they are merged together.
library(dplyr) iris_num <- iris %>% select_if(is.numeric) us <- new_umapscan(iris_num, n_neighbors = 25, min_dist = 0.1, seed = 1337) us <- compute_clusters(us, minPts = 3, eps = 0.5)rename_cluster(us, "1", "Cluster 1")#> #> Call: new_umapscan(d = iris_num, n_neighbors = 25, min_dist = 0.1, #> seed = 1337) #> #> UMAP embeddings of a 150x4 data frame #> #> Clusters : #> #> levelName #> 1 #> 2 ¦--<Noise> #> 3 ¦--2 #> 4 ¦--3 #> 5 °--Cluster 1us#> #> Call: new_umapscan(d = iris_num, n_neighbors = 25, min_dist = 0.1, #> seed = 1337) #> #> UMAP embeddings of a 150x4 data frame #> #> Clusters : #> #> levelName #> 1 #> 2 ¦--1 #> 3 ¦--2 #> 4 ¦--3 #> 5 °--<Noise>