Skip to main content
Topic: How to access data returned by getEIC? (Read 3689 times) previous topic - next topic

How to access data returned by getEIC?

I am a dill and a dodo with failing Google fu,

I can open a data file in R with
Code: [Select]
filename <- "#4606.mzXML"
xraw <- xcmsRaw(filename)
and get an extracted ion chromatogram with
Code: [Select]
mzr <- cbind(179.9,180.3)
rtr <- cbind(397,1560.3)
eicm <- getEIC(xraw, mzrange = mzr, rtrange = rtr)
but for further processing I would now like to access the values for 'rt' and 'intensity' as displayed by
Code: [Select]
> attr(eicm,"eic")
$xcmsRaw
$xcmsRaw[[1]]
              rt  intensity
  [1,]  397.022      1425
  [2,]  397.241      13700
...
[5510,] 1560.069          0
[5511,] 1560.288      36000
Could somebody please help with the required voodoo?

TIA

Re: How to access data returned by getEIC?

Reply #1
I have answered my own question after a good night's sleep.
Code: [Select]
temp <- attr(eicm,"eic")
rtime <- temp$xcmsRaw[[1]][,1] # get rt's
intensity <- temp$xcmsRaw[[1]][,2] # get intensities
Sorry for the noise.