Hope this help:
files <- list.files(path=myPath, pattern="xml", full.names = TRUE, recursive = TRUE)
xset <- xcmsSet(files, method="centWave", polarity="positive", prefilter=c(3,100), ppm=30, peakwidth=c(10,60), snthr=10)
xsetR <- retcor(xset, method="obiwarp", profStep=0.1, plottype="deviation")
xsetR <- group(xsetR, bw=5, mzwid=0.025, minfrac=0.5, minsamp=1)
xset.finale <- fillPeaks(xsetR)
I aloso suggest to read THIS
Best