spearmanCorrMethod {similaRpeak} | R Documentation

## Spearman's rho statistic of two profiles

### Description

Calculate and return the Spearman's rho statistic of two profiles. If one profile has a standard deviation inferior to the threshold, the function returns `NA`. When no complete element pair are present, `NA` is returned.

### Usage

    spearmanCorrMethod(profile1, profile2, threshold = 1e-08)

### Arguments

`profile1` | a `vector` of `numeric` values, the first profile containing the alignment depth for each position. The `profile1` and `profile2` should have the same length.
`profile2` | a `vector` of `numeric` values, the second profile containing the alignment depth for each position. The `profile1` and `profile2` should have the same length.
`threshold` | a `numeric`, the minimum standard deviation accepted to calculate a ratio. Default = 1e-8

### Value

The calculated ratio or `NA` if one profile has a standard deviation inferior to the threshold. If profiles have no complete element pair, `NA` is returned.

### Author(s)

Astrid Deschenes, Elsa Bernatchez

### See Also

- `MetricFactory` for using the recommanded interface to calculate all available metrics separately or togheter.

[Package similaRpeak version 1.12.0 Index]