\name{xcms.import}
\alias{xcms.import}
\title{
Import required data from an XCMS object
}
\description{
Imports data required for AStream analysis directly from a XCMS object.
}
\usage{
xcms.import(object)
}
\arguments{
  \item{object }{ XCMS object.}
}
\value{
A list containing the following names:
  \item{data }{ data.frame where rows correspond to features and the first two columns correspond to the m/z  and retention time values, respectively. The remaining columns correspond to the feature intensities for each of the analyzed samples.}
  \item{class }{ sample phenotypes.}
}
\references{
  Smith C.A., Want E.J., O'Maille G., Siuzdak G. "XCMS: Processing mass spectrometry data for metabolite profiling using nonlinear peak alignment, matching and identification."
  Analytical Chemistry 2006
}
\author{A.Alonso, et al. Grup de Recerca de Reumatologia 2010, bioinformatics@urr.cat.}
\seealso{\code{\link{data.norm}}, \code{\link{isotope.search}}, \code{\link{adduct.search}}, \code{\link{printresults}}.}
\examples{
## Perform data pre-processing with XCMS on faahKO dataset
library(xcms)
library(faahKO)
cdfpath <- system.file("cdf", package = "faahKO")
cdffiles <- list.files(cdfpath, recursive = TRUE, full.names = TRUE)
xset <- xcmsSet(cdffiles, snthresh = 3)
xset <- group(xset)
xset <- retcor(xset, family = "s", plottype = "none")
xset <- group(xset, bw = 10)
xset <- fillPeaks(xset)
## Import data directly from XCMS object
input <- xcms.import(xset)
}