coreClust: Clustering

Description Usage Arguments Value Author(s) Examples

View source: R/coreClust.R

Description

A sample clustering framework (described in "Examples" section, used as default in iterClust framework). Customized frameworks can be defined following rules specified in "Usage", "Arguments" and "Value" sections.

Usage

1
coreClust(dset, iteration)

Arguments

dset

(numeric matrix) features in rows and observations in columns

iteration

(positive integer) specifies current iteration

Value

a list, each element contains clustering vectors (named numeric vector with observation names as name and corresponding cluster number as element) under a specific clustering parameter

Author(s)

DING, HONGXU (hd2326@columbia.edu)

Examples

1
2
3
4
5
6
coreClust <- function(dset, iteration){
    dist <- as.dist(1 - cor(dset))
    range=seq(2, ncol(dset)-1, by = 1)
    clust <- vector("list", length(range))
    for (i in 1:length(range)) clust[[i]] <- pam(dist, range[i])$clustering
    return(clust)}

iterClust documentation built on Nov. 8, 2020, 5:43 p.m.