gaussWeight: Gaussian weight as a function of distance and fwhm

View source: R/gaussWeight.R

gaussWeightR Documentation

Gaussian weight as a function of distance and fwhm

Description

This function is used to estimate the appropriate Gaussian weighting to scale the intensities to be used with the lipid search method. The Gausian is constructed based on fwhm(m).

Usage

gaussWeight(
  x,
  m,
  fwhm,
  ionMode = NA,
  plot = FALSE,
  savePlot = FALSE,
  path = file.path(getwd(), paste0("lipidSearch-", m, ".svg"))
)

Arguments

x

mass shift; the distance (in Da) from the theoretical mass that is being searched to the measured masses in a spectrum.

m

a numeric, the theoretical mass.

fwhm

a numeric, the estimated fwhm as a function of m/z, see '?estimateFwhm'.

plot

whether to plot.

savePlot

whether to save a plot as svg.

path

path to the saved plot.

Value

Returns a numeric vector of the same length as x, representing the corresponding weights.


CeMOS-Mannheim/moleculaR documentation built on April 14, 2025, 8:27 a.m.