R/peak_calculations.R
    calculate_area.Rdcalculates area of peak from discrete signal and time measurements can deal with time points out of order as long as time and signal indices are matched
calculate_area(t, y, tstart = NULL, tend = NULL, const_dt = FALSE)
| t | the time points | 
|---|---|
| y | the signal data | 
| tstart | the starting time of the signal to integrate, NULL (default) starts with the signal from the first time point | 
| tend | the ending time of the signal to integrate, NULL (default) ends with the signal at the last time point | 
| const_dt | if the time interval between data points is knonw to be constant use TRUE to make the computation slightly faster (~2-3 times with peaks 10,000 data points wide), default is FALSE | 
integrated area in units of [y units][t units]