kmeansClust: K-Means clustering across sections

Description Usage Arguments Value See Also Examples

View source: R/process.R

Description

Performs K-Means clustering across sections in a SummarizedExperiment object.

Usage

1
kmeansClust(object, centers, matrix = "normalized", ...)

Arguments

object

A SummarizedExperiment object.

centers

Integer, number of clusters, namely k.

matrix

Character, must be one of "count", "normalized", or "scaled".

...

other parameters passed to kmeans.

Value

A SummarizedExperiment object. The obtained cluster labels are saved in slot meta.

See Also

kmeans for performing K-Means clustering on a matrix.

Examples

1
2
3
4
5
6
7
data(zh.data)
zh <- createTomo(zh.data)
zh <- kmeansClust(zh, 3)

# Use scaled read counts to calculate distance
zh <- scaleTomo(zh)
zh <- kmeansClust(zh, 3, matrix="scaled")

tomoda documentation built on Nov. 8, 2020, 8:10 p.m.