For given dimensional reduction (e.g., UMAP), return cluster center coordinates.

getClusterCenters(df, which.center = "mean")

Arguments

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'.

Value

df.centers

Author

Nicholas Mikolajewicz

Examples


# compute cluster centers
which.center <- "mean"
df.red.centers <- get.cluster.centers(df.red, which.center)
#> Error in get.cluster.centers(df.red, which.center): could not find function "get.cluster.centers"