View source: R/cosine_spectra.R
cosine_spectra | R Documentation |
Takes two spectra in tibble form, calculates their cosine similarity score.
cosine_spectra(spec_1, spec_2, thres_pks = 2, x = "mz")
spec_1 |
Spectrum 1 in tibble form, with x-axis named as passed |
spec_2 |
Spectrum 2 in tibble form, with x-axis named as passed |
thres_pks |
Minimum number of matching peaks, else return 0 |
x |
Name of x-coordinate column (e.g. |
cosine similarity score of the two spectra (dbl)
cos <- cosine_spectra(ions %>% filter(scan == 114), ions %>% filter(scan == 114)) > 0.94
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.