Learn R Programming

dispRity (version 1.7.0)

sort.dispRity: Sorting or ordering a dispRity object.

Description

Sort (or order) the subsets of a dispRity object.

Usage

# S3 method for dispRity
sort(x, decreasing = FALSE, sort, ...)

Arguments

x

A dispRity object.

decreasing

logical. Should the sort be in ascending or descending order? Is ignored if sort is used.

sort

An optional vector of numeric values corresponding to the order in which to return the subsets.

...

optional arguments to be passed to sort.

Author

Thomas Guillerme

See Also

dispRity, test.dispRity, plot.dispRity, get.subsets, get.disparity.

Examples

Run this code
## Load the disparity data based on Beck & Lee 2014
data(disparity)

## Sorting the data
summary(disparity)
summary(sort(disparity, decreasing = TRUE))
summary(sort(disparity, sort = c(7,1,3,4,5,2,6)))

Run the code above in your browser using DataLab