forceReverse {methylscaper} | R Documentation

## Force reversal of a subset of the ordering

### Description

This reverses a subset of the ordering, as determined by the user. By default, the entire ordering is reversed.

### Usage

    forceReverse(
      orderObject,
      reverseStart = 1,
      reverseEnd = length(orderObject$order1)
    )

### Arguments

`orderObject` | An object of class `orderObject`, generated with the `initialOrder` function.
`reverseStart` | The first index to be included in the reversal.
`reverseEnd` | The last index to be included in the reversal.

### Value

The new complete ordering, with the reversal applied.

### Examples

    data(singlemolecule_example)

    orderObj <- initialOrder(singlemolecule_example, Method = "PCA")
    # reorder first 50 cells/molecules (rows)
    orderObj$order1 <- refineFunction(orderObj, 1, 50)
    orderObj$order1 <- forceReverse(orderObj, 1, 50)

[Package methylscaper version 1.0.1 Index]