peakwidth_est: peakwidth_est

Description Usage Arguments Details Value

View source: R/peakwidth_est.R

Description

This function is designed to generate peak width estimates for each TIC peak detected by sliding window analysis.

Usage

1
2
3
4
5
6
7
8
peakwidth_est(
  peak_vector,
  time,
  intensity,
  start = NULL,
  end = NULL,
  old_r2 = NULL
)

Arguments

peak_vector

A numeric vector with names of specific time points of the chromatography data measured. The numeric values correspond to indiciess within the total chromatographic data that span the peak width.

time

This vector contains the time measurements during the chromatography. This vector is used to match the values in peak_vector to the names in the intensity vector.

intensity

A measured intensity values for chromatorgraphy

start

A numeric index indicating where peak starts. Leave null.

end

The same as above, leave null.

old_r2

A previous fit of model used to judge recursion of fit.

Details

This function takes in one peak vector at a time and runs a linear model on the selected start and end points of a peak. By measuring the change of the fit of the model, the function returns an index of values corresponding to a peak. This function works recursively to estimate the width of the peak. Ultimately, it returns the names of the final points in the peak.

Value

This function returns a scalar value representing the estimated peak width for a given peak.


Autotuner documentation built on Nov. 8, 2020, 5:59 p.m.