Factory function for creating param classes extending
bluster::BlusterParam to be used with clusterData(). These param
classes define the clustering operation to be performed and also contain
relevant parameters in an easily accessible format.
clusterParam(method, ...)"kmeans" - K-means clustering
"affinity" - Affinity propagation (needs apcluster)
"som" - Self-organizing maps (needs kohonen)
"agnes" - Agglomerative nesting
"diana" - Divisive analysis clustering
"hclust" - Hierarchical clustering
"dbscan" - Density-based clustering with DBSCAN
"dmm" - Dirichlet multinomial mixture clustering (needs DirichletMultinomial)
"twostep" - Two step clustering with vector quantization
"clara" - Clustering large applications (pam for large datasets)
"mbkmeans" - Mini-batch k-means clustering (needs mbkmeans)
"pam" - Partitioning around medoids
"leiden_igraph" - Leiden clustering via igraph
"leiden_python" - Leiden clustering with python leidenalg
"louvain_community" - Louvain clustering with python community
"louvain_multinet" - generalized Louvain clustering with multinet
x <- clusterParam("kmeans", centers = 2)
x@centers
#> [1] 2
m <- matrix(runif(9), nrow = 3)
clusterData(m, x)
#> cluster
#> <fctr>
#> 1: 2
#> 2: 1
#> 3: 2
# add ids
rownames(m) <- paste("id", seq_len(3), sep = "_")
clusterData(m, x)
#> cell_ID cluster
#> <char> <fctr>
#> 1: id_1 2
#> 2: id_2 1
#> 3: id_3 2