Learn R Programming

caOmicsV (version 1.2.0)

sortClinicalData: Sort Clinical Data by a Column

Description

Sort sample information by a column defined by byItem (a column header). This function is for sorting sample information only.

Usage

sortClinicalData(clinicalData, byItem)

Arguments

clinicalData
A data frame with rows for samples and columns for features. Sample names must be in the first column.
byItem
character vector of a feature (column header) by which the data will be sorted.

Value

sampleData
copy of the first argument with new row order.

Examples

Run this code
    data(sampleDemoData)
    sampleInfo <- sortClinicalData(sampleDemoData, colnames(sampleDemoData)[1])

Run the code above in your browser using DataLab