Learn R Programming

unifiedWMWqPCR (version 1.8.0)

sort.uwmwRes: Sort and order method for uWMWRes objects

Description

This functions provide sorting functionality for uwmwRes objects. It allows to sort the values in the object in order to get the genes with the highest OR, lowest p value, ... The function uses order underneath

Usage

"sort"(x, decreasing = FALSE, which = c("or", "p", "se", "name", "z"), na.last = TRUE, ...)
"unorder"(x, ...)
"unorder"(x, ...)
"order"(..., na.last = TRUE, decreasing = FALSE)

Arguments

x
a uwmwRes object
decreasing
a logical value indicating whether values should be sorted in increasing or decreasing order.
which
a character value indicating on which values should be used to sort on. The possible values are: "or" for sorting on the odds ratio, "p" for sorting on the p value, "se" for sorting on the standard error or "name" for sorting on the gene names.
na.last
a logical value indicating whether NA results should be sorted at the end. See order for more information.
...
currently ignored

Value

sort returns a sorted uwmwRes object.

Details

The function does not change the internal order, but changes the slot id in the object. This slot is used by other functions to give the requested values

See Also

The functions is.unsorted, orderedBy and getOrder to check on the ordered state of a uwmwRes object.

order returns the order of the uwmwRes object.

unorder returns a uwmwRes object with the order removed.

Examples

Run this code
data(NBmat)
NBtest <- uWMW(NBmat, groups=NBgroups)
NBsort <- sort(NBtest,which="name")
NBsort[1:10]

Run the code above in your browser using DataLab