orderBy {genomation} | R Documentation

## Reorder all elements of a ScoreMatrixList to a given ordering vector

### Description

Reorder all elements of a ScoreMatrixList to a given ordering vector

### Usage

    orderBy(sml, ord.vec)

    ## S4 method for signature 'ScoreMatrixList'
    orderBy(sml, ord.vec)

### Arguments

`sml` | `ScoreMatrixList` object
`ord.vec` | an integer vector

### Value

`ScoreMatrixList` object

### Examples

    library(GenomicRanges)
    data(cage)
    data(cpgi)
    data(promoters)

    cage$tpm = NULL
    targets = GRangesList(cage=cage, cpgi=cpgi)
    sml = ScoreMatrixList(targets, promoters, bin.num=10)
    kmeans.clust = kmeans(sml$cage,3)

    sml.ordered = orderBy(sml, kmeans.clust$cluster)

    multiHeatMatrix(sml.ordered)

[Package genomation version 1.20.0 Index]