Description Usage Arguments Value
View source: R/Functions_Spectra_comparison.R
Compare two vectors of equal length pairwise and calculate a similarity score (e.g. intensity values of matched MS peaks).
1 2 | pairCompare(v1, v2, NAasZero = T, method = c("cosine", "pearson",
"kendall", "spearman"))
|
v1 |
vector 1 |
v2 |
vector 2 |
NAasZero |
replace NA values with 0 if the value is NA in one vector, but not the other |
method |
"cosine" will use lsa::cosine(), "pearson" will use stats::cor() |
the result of the method call, a numeric similarity score
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.