[R] OrgMassSpecR peak area issue

Claudia Beleites claudia.beleites at ipht-jena.de
Mon Mar 18 20:22:07 CET 2013


Hi Bryan,

Division by 2 is correct, comes from trapezoid calculation. 
The modulo line is a funny way of producing c (2 : n, 1)

Best,

Claudia


Am Mon, 18 Mar 2013 15:00:06 -0400
schrieb Bryan Hanson <hanson at depauw.edu>:

> 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:
> 
> > Hello!
> > 
> > I am having an issue with the OrgMassSpecR package.  I run my HPLC
> > using a DAD detector.  My raw data is exported form chemstation as
> > a csv file.  I then upload the csv into Rstudio no problem.  Using
> > the DrawChromatogram function, I get a nice chromatogram, and my
> > retention time, peak area, and apex intensity values are given as
> > well.
> > 
> > The problem comes with the peak area value given. The peak area is
> > much smaller than a value that would make sense.  My peak area
> > value is actually less than my apex intensity value.  Is this
> > because I am using a DAD detector rather than an MS? If so, is
> > there a simply way to edit the peak area equation so that it will
> > also work with absorbance values?
> > 
> > Any help is greatly appreciated.
> > 
> > Thanks for your time.
> > 
> > Chris Beaver
> > 
> > 	[[alternative HTML version deleted]]
> > 
> > ______________________________________________
> > R-help at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
> > http://www.R-project.org/posting-guide.html and provide commented,
> > minimal, self-contained, reproducible code.
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html and provide commented,
> minimal, self-contained, reproducible code.



-- 
Claudia Beleites
Spectroscopy/Imaging
Institute of Photonic Technology 
Albert-Einstein-Str. 9
07745 Jena
Germany

email: claudia.beleites at ipht-jena.de
phone: +49 3641 206-133
fax:   +49 2641 206-399



More information about the R-help mailing list