supercell_cluster: Cluster super-cell data

View source: R/supercell_cluster.R

supercell_clusterR Documentation

Cluster super-cell data

Description

Cluster super-cell data

Usage

supercell_cluster(
  D,
  k = 5,
  supercell_size = NULL,
  algorithm = c("hclust", "PAM"),
  method = NULL,
  return.hcl = TRUE
)

Arguments

D

a dissimilarity matrix or a dist object

k

number of clusters

supercell_size

a vector with supercell size (ordered the same way as in D)

algorithm

which algorithm to use to compute clustering: "hclust" (default) or "PAM" (see wcKMedoids)

method

which method of algorithm to use:

  • for "hclust": "ward.D", "ward.D2" (default), "single", "complete", "average", "mcquitty", "median" or "centroid", (see hclust)

  • for "PAM": "KMedoids", "PAM" or "PAMonce" (default), (see wcKMedoids)

return.hcl

whether to return a result of "hclust" (only for "hclust" algorithm)

Value

a list with components

  • clustering - vector of clustering assignment of super-cells

  • algo - the algorithm used

  • method - method used with an algorithm

  • hlc - hclust result (only for "hclust" algorithm when return.hcl is TRUE)


SuperCell documentation built on Oct. 25, 2024, 5:07 p.m.