sortDataFrame: Sorts a data frame according to the well names.

Description Usage Arguments Value Author(s) Examples

View source: R/wellNameSort.R

Description

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

Usage

1
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

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

CRUKMI-ComputationalBiology/twoddpcr documentation built on Feb. 14, 2021, 9:18 p.m.