Hi to everybody, I'm starting to work with xcms with a lot of satisfaction but I still have some doubt. In particular I haven't still discovered a parameter that allow me to exclude some masses from my analysis. Do you have any suggestion??
Best
Riccardo
There is no such option.
You can simply ignore these features in the result table,
or filter them out in Excel or R
http://groups.google.com/group/xcms/bro ... 1332dba3b0 (http://groups.google.com/group/xcms/browse_thread/thread/eca9f2e7d29e2cd6/efcbab1332dba3b0?lnk=gst&q=filter#efcbab1332dba3b0)
Thanks for your suggestion!! :D
I tryed the example of the link you suggested:
(xset1 <- xset[which(xset@peaks[,"mz"]<600 & xset@peaks[,"mz"]>100),] )
but the R consol give this error:
Errore in xset[which(xset@peaks[, "mz"] < 600 & xset@peaks[, "mz"] > 100), : object of type 'S4' is not subsettable
Do you have any further suggestion?? :?:
Should work..
> idx<-which(xs@peaks[,"mz"] > 200 & xs@peaks[,"mz"] < 400)
> head(idx)
##[1] 9 17 24 33 34 35
## and then something like:
xs@peaks<-xs@peaks[idx,]
Note that you used the object and not the slot. Here I access the slot peaks to make the index and then replace the slot with the indexed slot. It maybe easier to not do it in one line.
Paul
Thanks for you suggestion!! Now the code is right.
Best