Skip to content
Prev 319775 / 398502 Next

OrgMassSpecR peak area issue

If you type DrawChromatogram you can see the method used to calculate the peak area.  Looks to me like you could easily hack it if you wanted.  The relevant part about peak areas is this:

        for (j in 1:n) {
            k <- (j%%n) + 1
            x[j] <- peakTime[j] * peakIntensity[k] - peakTime[k] * 
                peakIntensity[j]
        }
        peakArea[i] <- abs(sum(x)/2)

which looks pretty standard to me, though I'm not clear right off the top of my head why they are dividing by 2.  You can always contact the maintainer.

Bryan
On Mar 18, 2013, at 1:34 PM, Christopher Beaver <christopher.beaver at gmail.com> wrote: