\HeaderA{gamasses-methods}{Determines clusters of masses in an Massvector}{gamasses.Rdash.methods}
\aliasA{gamasses,Massvector-method}{gamasses-methods}{gamasses,Massvector.Rdash.method}
\aliasA{gamasses,Massvectorlist-method}{gamasses-methods}{gamasses,Massvectorlist.Rdash.method}
\keyword{methods}{gamasses-methods}
\keyword{misc}{gamasses-methods}
\begin{Description}\relax
Determines \emph{clusters} of masses in an Massvector. To determine abundant masses we compute two histograms for the dataset.
\end{Description}
\begin{Arguments}
\begin{ldescription}
\item[\code{object}] \code{Massvector} or \code{Massvectorlist}
\item[\code{accur}] accuracy (bandwith) in Da
\item[\code{abund}] how many masses should be in a cluster to be considered
as abundant
\item[\code{func}] A function with the following arguments:
\Itemize{
\item mass -- e.g mass at which cluster was detected
\item samplesize -- number of peaks in the spectrum
\item abund -- how many masses should be in a cluster to be considered
\item accur -- bandwith
\item sd -- further arguments
}
The function should return a \code{numeric} value indicating the
threshold (number of peaks) that a cluster are considered as
abundant.  In the simplest case the function returns just the argument
\code{abund}.
(status: Testing, suggestions welcome.)

\end{ldescription}
\end{Arguments}
\begin{Section}{Methods}
\describe{
\item[object = "Massvector"] ...
\item[object = "Massvectorlist"] ...
}
\end{Section}
\begin{Examples}
\begin{ExampleCode}
data(pldata)
gamasses(pldata,abund=4)
\end{ExampleCode}
\end{Examples}

