pairCompare: pairCompare

Description Usage Arguments Value

View source: R/Functions_Spectra_comparison.R

Description

Compare two vectors of equal length pairwise and calculate a similarity score (e.g. intensity values of matched MS peaks).

Usage

1
2
pairCompare(v1, v2, NAasZero = T, method = c("cosine", "pearson",
  "kendall", "spearman"))

Arguments

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()

Value

the result of the method call, a numeric similarity score


mjhelf/MassTools documentation built on Nov. 19, 2021, 2:38 a.m.