\HeaderA{retcor-methods}{Align retention times across samples}{retcor.Rdash.methods}
\aliasA{retcor}{retcor-methods}{retcor}
\aliasA{retcor,xcmsSet-method}{retcor-methods}{retcor,xcmsSet.Rdash.method}
\keyword{methods}{retcor-methods}
\keyword{file}{retcor-methods}
\begin{Description}\relax
Use ``well behaved'' peak groups to calculate retention time
deviations for every time point of each sample. Use smoothed
deviations to align retention times.
\end{Description}
\begin{Arguments}
\begin{ldescription}
\item[\code{object}] the \code{xcmsSet} object
\item[\code{missing}] number of missing samples to allow in retention time correction
groups

\item[\code{extra}] number of extra peaks to allow in retention time correction
correction groups

\item[\code{method}] either \code{"loess"} for non-linear alignment or \code{"linear"}
for linear alignment

\item[\code{span}] degree of smoothing for local polynomial regression fitting

\item[\code{family}] if \code{gaussian} fitting is by least-squares with no outlier
removal, and if \code{symmetric} a re-descending M estimator
is used with Tukey's biweight function, allowing outlier removal

\item[\code{plottype}] if \code{deviation} plot retention time deviation points and
regression fit, and if \code{mdevden} also plot peak overall
peak density and retention time correction peak density

\item[\code{col}] vector of colors for plotting each sample
\item[\code{ty}] vector of line and point types for plotting each sample
\end{ldescription}
\end{Arguments}
\begin{Value}
An \code{xcmsSet} object
\end{Value}
\begin{Section}{Methods}
\describe{
\item[object = "xcmsSet"] \code{retcor(object, missing = 1, extra = 1,
               method = c("loess", "linear"), span = .2,
               family = c("gaussian", "symmetric"),
               plottype = c("none", "deviation", "mdevden"),
               col = NULL, ty = NULL)}

}
\end{Section}
\begin{SeeAlso}\relax
\code{\LinkA{xcmsSet-class}{xcmsSet.Rdash.class}},
\code{\LinkA{loess}{loess}}
\end{SeeAlso}

