View source: R/utility_functions.R
getClusterCenters | R Documentation |
For given dimensional reduction (e.g., UMAP), return cluster center coordinates.
getClusterCenters(df, which.center = "mean")
df |
data.frame with columns 'x' and 'y' specifying dimensional reduction coordinates, and column 'cluster' or 'clusters' specifying cluster membership. |
which.mean |
Specify which central values to use. One of 'mean' or 'median'. Default is 'mean'. |
df.centers
Nicholas Mikolajewicz
# compute cluster centers
which.center <- "mean"
df.red.centers <- get.cluster.centers(df.red, which.center)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.