smoothVALUE: Helper function to model intensity integration values for...

Description Usage Arguments Value

View source: R/functions-fillPEAKS_helpers.R

Description

Helper function is used by the modelPEAKS function to model intensity integration values for missing peaks. Function fit a smoothing spline to centWave values reported for the peak-of-interest in all samples in the study. For samples in which peak was not detected, centWave values are predicted.

Usage

1
smoothVALUE(var, x, peak, lambda = 10)

Arguments

var

character with a single centWave value to be modelled, e.g. "mz"

x

numeric representing indeces of peaks for the supplied 'peak' data.frame.

peak

data.frame with all centWave values (columns) for the peak-of-interest for all samples (rows). For samples in which peak as not detected, NAs must be listed.

lambda

numeric representing smoothing parameter lambda. Set to 10 by default, which corresponds to number of study samoples in between two quality control samples in standard experimental protocols.

Value

Function returns centWave values for the peak-of-interest, which includes predicted values for samples in which it was not originally detected.


lauzikaite/massFlowR documentation built on April 29, 2020, 9:45 a.m.