Learn R Programming

OmicsMarkeR (version 1.4.2)

spearman: Spearman Rank Correlation Coefficient

Description

Calculates spearman rank correlation between two vectors

Usage

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

Run this code
# Spearman demo
v1 <- seq(10)
v2 <- sample(v1, 10)
spearman(v1, v2)

Run the code above in your browser using DataLab