bslnoff {PROcess}R Documentation

Baseline Substraction

Description

This function estimates the baseline and then removes baseline from the raw spectrum.

Usage

bslnoff(f, breaks = 200, qntl = 0, method = c("loess", "approx"), bw = 0.005, plot = FALSE, ...)

Arguments

f a matrix with M/Z values in the first column and intensities in the second column
breaks number of breaks set to M/Z values for finding the local minima or points below a centain quantile of intensities; breaks -1 equally spaced intervals on the log M/Z scale.
qntl if 0, find local minima; if >0 find intensities < qntl*100th quantile locally.
method "loess" or "approx" (linear interpolation).
bw the bandwidth to be passed to loess.
plot TRUE or FALSE, if true, it will plot the raw spectrum, theestimated baseline and the baseline substracted spectrum.
... parameters for plot.

Value

a matrix of two columns: the first column being the M/Z values same as the input, and the second column being the baseline substracted spectra.

Author(s)

Xiaochun Li

Examples

fdat <- system.file("Test", package = "PROcess")
fs <- list.files(fdat, pattern="*csv*", full.names=TRUE)
f1 <- read.files(fs[1])
fcut <- f1[f1[,1]>0,]
bseoff <-bslnoff(fcut,method="loess",plot=TRUE, bw=0.1)
title(basename(fs[1]))

[Package PROcess version 1.3.2 Index]