sortDataFrame {twoddpcr} | R Documentation

## Sorts a data frame according to the well names.

### Description

Well names can be sorted according to the leading letter or the trailing digit.

### Usage

    sortDataFrame(df, sortByLetter = FALSE)

### Arguments

`df` | A data frame with row names of the form A01, A02, B01, etc.
`sortByLetter` | If `TRUE`, the resulting list is sorted by the letter in the well names first, e.g. "A02" comes before "B01". If `FALSE`, the result is sorted by the numeric component of the well names first, e.g. "B01" comes before "A02". Defaults to `FALSE`.

### Value

The data frame `df` with the rows sorted.

### Author(s)

Anthony Chiu, anthony.chiu@cruk.manchester.ac.uk

### Examples

    ## Sort a subset of the KRAScounts data frame.
    df <- KRAScounts[, c("Ratio", "FracAbun")]
    sortDataFrame(df=df, sortByLetter=FALSE)
    sortDataFrame(df=df, sortByLetter=TRUE)

[Package twoddpcr version 1.8.0 Index]