View source: R/classes_methods.R
cossim | R Documentation |
cossim()
calculates the cosine of the spectral constrast angle as a
measure for the similarity of two spectra.
cossim(x, y, type = c("spectrum", "neutral_losses"), mzTolerance = 1e-05) ## S4 method for signature 'MS2spectrum,MS2spectrum' cossim(x, y, type = c("spectrum", "neutral_losses"), mzTolerance = 1e-05) ## S4 method for signature 'pseudospectrum,pseudospectrum' cossim(x, y, type = c("spectrum", "neutral_losses"), mzTolerance = 1e-05)
x, y |
MS2 spectra, either as |
type |
Whether similarity between spectra ( |
mzTolerance |
The m/z tolerance used for merging. If two fragment peaks
are within tolerance, they are regarded as the same. Defaults to
|
The cosine similarity of x
and y
x = MS2spectrum,y = MS2spectrum
: cossim
method for
MS2spectrum
objects
x = pseudospectrum,y = pseudospectrum
: cossim
method for
pseudospectrum
objects
load(file = system.file("extdata", "annotatedSpeclist.RData", package = "CluMSIDdata")) cossim(annotatedSpeclist[[1]], annotatedSpeclist[[2]])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.