Learn R Programming

ClassComparison (version 3.3.5)

rankSum: Wilcoxon Rank-Sum Statistic

Description

Compute the Wilcoxon rank-sum statistic.

Usage

rankSum(data, selector)

Value

Returns an integer, the rank-sum of the subset of the

data for which the selector is true.

Arguments

data

numeric vector

selector

logical vector the same length as data

Author

Kevin R. Coombes krc@silicovore.com

Details

This is an efficient function to compute the value of the Wilcoxon rank-sum statistic without the extra overhead of the full wilcox.test function. It is used internally by the MultiWilcoxonTest class to perform row-by-row Wilcoxon tests.

See Also

dwil, MultiWilcoxonTest

Examples

Run this code
dd <- rnorm(100)
cc <- rep(c(TRUE, FALSE), each=50)
rankSum(dd, cc)

Run the code above in your browser using DataLab