cluster2pattern {projectR} | R Documentation

## Generic cluster2pattern function

### Description

Function to make patterns of continuous weights from clusters.

### Usage

    cluster2pattern(clusters, NP, Data, ...)

    ## S4 method for signature 'kmeans'
    cluster2pattern(clusters, Data)

    ## S4 method for signature 'hclust'
    cluster2pattern(clusters, NP, Data = NA)

### Arguments

`clusters` | a cluster object which could be either an hclust or a kmeans object
`NP` | number of desired patterns
`Data` | data used to make clusters object
`...` | Additional arguments to cluster2pattern

### Value

An object of class pclust containing pattern weights corresponding for each cluster.

### Examples

    k.RNAseq6l3c3t<-kmeans(p.RNAseq6l3c3t,22)
    cluster2pattern(clusters=k.RNAseq6l3c3t,NP=22,Data=p.RNAseq6l3c3t)

    distp <- dist(p.RNAseq6l3c3t)
    hc.RNAseq6l3c3t <- hclust(distp)
    cluster2pattern(clusters=hc.RNAseq6l3c3t,NP=22,Data=p.RNAseq6l3c3t)

[Package projectR version 1.8.0 Index]