\HeaderA{shrinkVector}{shrink a vector by partitioning it into bins and taking the maxima in
the bins}{shrinkVector}
\begin{Description}\relax
Given a (potentially very long) vector, the vector is partitioned into a given 
number of (up to rounding errors) equally long bins, and a vector summerizing  
each of the bins with one number it returned.
\end{Description}
\begin{Usage}
\begin{verbatim}
shrinkVector(vec, newLength,  mode = c("max", "min", "absmax", "mean"))
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{vec}] The vector to be shrunk. May be numeric or integer.
\item[\code{newLength}] The desired size of the return vector, i.e., the number of
partitions 
\item[\code{mode}] the summerization mode:
'max': take the maximal value of each bin;
'min': take the minimal value of each bin;
'absmax': take the value with largest absolute value;
'mean': take the mean of the bin values. 
\end{ldescription}
\end{Arguments}
\begin{Value}
A vector of length \code{newLength} with the summary values of each of the bin
of \code{vector}.
\end{Value}
\begin{Author}\relax
Simon Anders, EMBL-EBI (sanders\@fs.tum.de)
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{plotLongVector}{plotLongVector}},
\code{\LinkA{ShortRead::pileup}{ShortRead::pileup}}, 
\code{\LinkA{HilbertVisGui::simpleLinPlot}{HilbertVisGui::simpleLinPlot}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
   shrinkVector( 100000 + 1:1000, 17 )
\end{ExampleCode}
\end{Examples}

