Label Positions of Clusters on an Embedding
Source:R/figure-data-embedding.R
ClusterLabelPositions.RdThe median position of the points of each cluster with at least
min_points points, for numbering clusters on the embedding.
Usage
ClusterLabelPositions(
data,
x = "x",
y = "y",
cluster = "cluster",
filter = NULL,
min_points = 150
)Examples
d <- data.frame(x = c(1, 2, 3, 10), y = c(1, 1, 2, 5), cl = c(1, 1, 1, 2))
ClusterLabelPositions(d, cluster = "cl", min_points = 2)
#> label x y n
#> 1 1 2 1 3