Skip to main content
Topic: Overlapping EIC plots (Read 4356 times) previous topic - next topic

Overlapping EIC plots

Hi All,

New to the forum so apologies if I'm not formatting this question correctly, but what I'd like to do is plot two EICs in the same space to get a result similar to this: http://http://acdlabs.typepad.com/.a/6a00d834fe3a5753ef01630624cec6970d-pi

I can get one plot to generate successfully using the plotEIC() method and the XCMS documentation says that there should be a parameter to this function called add which lets you add an EIC to an already existing EIC, but I get an unused argument error when I try this. Is there a way to accomplish what I'm trying to do?

Thanks in advance!

Re: Overlapping EIC plots

Reply #1
Seems to work?
Can you produce an example where it does not?

Code: [Select]
library(xcms)
library(faahKO)

cdfpath <- file.path(find.package("faahKO"), "cdf")
files <- list.files(cdfpath, recursive = TRUE)

xraw <- xcmsRaw(paste0(cdfpath,"/",files[1]))
xraw2 <- xcmsRaw(paste0(cdfpath,"/",files[2]))

plotEIC(xraw, add=FALSE)
plotEIC(xraw2, add=FALSE)

plotEIC(xraw, add=FALSE)
plotEIC(xraw2, add=TRUE,col="red")
Blog: stanstrup.github.io