
Get k-means cluster assignments from a fast cluster result
get_kmeans_clusters.RdGet k-means cluster assignments from a fast cluster result
Examples
# the centroid each cell was assigned to
sc <- demo_single_cells()
res <- fast_cluster_sc(
sc,
resolutions = 1.0,
fc_params = params_sc_fast_cluster(n_centroids = 30L),
return_kmeans = TRUE,
.verbose = FALSE
)
head(get_kmeans_clusters(res))
#> [1] 23 13 27 5 12 1
unlink(sc@dir_data, recursive = TRUE, force = TRUE)