\HeaderA{profRange-methods}{Specify a subset of profile mode data}{profRange.Rdash.methods}
\aliasA{profRange}{profRange-methods}{profRange}
\aliasA{profRange,xcmsRaw-method}{profRange-methods}{profRange,xcmsRaw.Rdash.method}
\keyword{methods}{profRange-methods}
\keyword{manip}{profRange-methods}
\begin{Description}\relax
Specify a subset of the profile mode matrix given a mass, time,
or scan range. Allow flexible user entry for other functions.
\end{Description}
\begin{Arguments}
\begin{ldescription}
\item[\code{object}] the \code{xcmsRaw} object
\item[\code{massrange}] single numeric mass or vector of masses
\item[\code{timerange}] single numeric time (in seconds) or vector of times

\item[\code{scanrange}] single integer scan index or vector of indecies
\item[\code{...}] arguments to other functions
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
This function handles selection of mass/time subsets of the profile
matrix for other functions. It allows the user to specify such
subsets in a variety of flexible ways with minimal typing.

Because \R{} does partial argument matching, \code{massrange},
\code{scanrange}, and \code{timerange} can be specified in short
form using \code{m=}, \code{s=}, and \code{t=}, respectively. If
both a \code{scanrange} and \code{timerange} are specified, then
the \code{timerange} specification takes precedence.

When specifying ranges, you may either enter a single number or
a numeric vector. If a single number is entered, then the closest
single scan or mass value is selected. If a vector is entered,
then the range is set to the \code{range()} of the values entered.
That allows specification of ranges using shortened, slightly
non-standard syntax. For example, one could specify 400 to 500
seconds using any of the following: \code{t=c(400,500)},
\code{t=c(500,400)}, or \code{t=400:500}. Use of the sequence
operator (\code{:}) can save several keystrokes when specifying
ranges. However, while the sequence operator works well for
specifying integer ranges, fractional ranges do not always work
as well.
\end{Details}
\begin{Value}
A list with the folloing items:

\begin{ldescription}
\item[\code{massrange}] numeric vector with start and end mass
\item[\code{masslab}] textual label of mass range
\item[\code{massidx}] integer vector of mass indecies
\item[\code{scanrange}] integer vector with stat ane end scans
\item[\code{scanlab}] textual label of scan range
\item[\code{scanidx}] integer vector of scan range
\item[\code{timerange}] numeric vector of start and end times
\item[\code{timelab}] textual label of time range
\end{ldescription}
\end{Value}
\begin{Section}{Methods}
\describe{
\item[object = "xcmsRaw"] \code{profRange(object, massrange = numeric(),
                  timerange = numeric(), scanrange = numeric(),
                  ...)}

}
\end{Section}
\begin{SeeAlso}\relax
\code{\LinkA{xcmsRaw-class}{xcmsRaw.Rdash.class}}
\end{SeeAlso}

