imputeChromatogram: Fill missing intensities in a chromatogram

Description Usage Arguments Value Author(s) See Also Examples

View source: R/fill_missing_intensity.R

Description

Fill missing intensities in a chromatogram

Usage

1
2
3
4
5
6
7
imputeChromatogram(
  chromatogram,
  method = "spline",
  polyOrd = 4,
  kernelLen = 9,
  splineMethod = "fmm"
)

Arguments

chromatogram

(data-frames) first column is time, second column is intensity.

method

(string) must be either "spline", "sgolay" or "linear".

polyOrd

(integer) must be less than kernelLen.

kernelLen

(integer) must be an odd integer.

splineMethod

(string) must be either "fmm" or "natural".

Value

(dataframe) has two columns:

time

(numeric)

intensity

(numeric)

Author(s)

Shubham Gupta, shubh.gupta@mail.utoronto.ca

ORCID: 0000-0003-3500-8152

License: (c) Author (2020) + GPL-3 Date: 2020-05-21

See Also

na.approx, na.spline

Examples

1
2
3
4
5
6
7
8
time <- seq(from = 3003.4, to = 3048, by = 3.4)
y <- c(0.2050595, 0.8850070, 2.2068768, 3.7212677, 5.1652605, 5.8288915, 5.5446804,
 4.5671360, 3.3213154, 1.9485889, 0.9520709, 0.3294218, 0.2009581, 0.1420923)
chrom <- data.frame(time, y)
chrom$y[c(1,8, 14)] <- NA
imputeChromatogram(chrom, "sgolay")
imputeChromatogram(chrom, "spline")
imputeChromatogram(chrom, "linear")

Roestlab/DIAlignR documentation built on March 3, 2021, 9:09 a.m.