areaIntegrator {DIAlignR} | R Documentation

## Calculates area between signal-boundaries.

### Description

This function sums all the intensities between left-index and right-index.

### Usage

    areaIntegrator(l1, l2, left, right, integrationType, baselineType, fitEMG)

### Arguments

`l1` | (list) A list of time vectors.
`l2` | (list) A list of intensity vectors.
`left` | (numeric) left boundary of the peak.
`right` | (numeric) right boundary of the peak.
`integrationType` | (string) method to ompute the area of a peak contained in XICs. Must be from "intensity_sum", "trapezoid", "simpson".
`baselineType` | (string) method to estimate the background of a peak contained in XICs. Must be from "base_to_base", "vertical_division_min", "vertical_division_max".
`fitEMG` | (logical) enable/disable exponentially modified gaussian peak model fitting.

### Value

area (numeric).

### Author(s)

Shubham Gupta, shubh.gupta@mail.utoronto.ca ORCID: 0000-0003-3500-8152 License: (c) Author (2019) + MIT Date: 2019-03-08

### Examples

    data("XIC_QFNNTDIVLLEDFQK_3_DIAlignR", package = "DIAlignR")
    XICs <- XIC_QFNNTDIVLLEDFQK_3_DIAlignR[["run1"]][["14299_QFNNTDIVLLEDFQK/3"]]
    l1 <- lapply(XICs, `[[`, 1)
    l2 <- lapply(XICs, `[[`, 2)
    areaIntegrator(l1, l2, left = 5203.7, right = 5268.5, "intensity_sum", "base_to_base", FALSE)
    # 224.9373

[Package DIAlignR version 1.2.0 Index]