fill_spectra: Fill spectra (with 0s)

View source: R/fill_spectra.R

fill_spectraR Documentation

Fill spectra (with 0s)

Description

Take tibble of full-scan chromatographic data grouped by scan, fill every missing x-coord (m/z or wl) in each scan with 0. This is important prior to single-ion or -wavelength peak detection and integration.

Usage

fill_spectra(chromdata, x = "mz")

Arguments

chromdata

Tibble with columns rt, mz/wl and intensity, pre-grouped by peak (e.g. by ROI.)

x

Name of spectrum x-coordinate (e.g. mz or wl.)

Value

The input tibble with 0-intensity observations added.

Examples


chromdata_filled <- chromdata %>%
 group_by(scan_rt) %>%
 fill_spectra

octopode/tidychrom documentation built on Nov. 2, 2022, 1:32 a.m.