spearman: Spearman Rank Correlation Coefficient

Description Usage Arguments Value Examples

View source: R/stability.R

Description

Calculates spearman rank correlation between two vectors

Usage

1
spearman(x, y)

Arguments

x

numeric vector of ranks

y

numeric vector of ranks with compatible length to x

Value

Returns the spearman rank coefficient for the two vectors

Examples

1
2
3
4
# Spearman demo
v1 <- seq(10)
v2 <- sample(v1, 10)
spearman(v1, v2)

Example output

[1] 0.4424242

OmicsMarkeR documentation built on April 28, 2020, 6:54 p.m.